2.4: pytest warning
还没有人认领这个 Issue。
评估
- 难度
- 1/5
- 预计耗时
- 1 小时以内
- 新手友好度
- 35/100
- Issue 类型
- 缺陷
- 描述清晰度
- 描述清楚
- 活跃度
- 停滞
- 技术栈
- python
- 领域
- testing-qa
调研方向
该警告会在运行 pytest 时报告,相关配置位于 pytest.ini 中;首先运行 /usr/bin/pytest -ra 进行复现。根据该警告和 issue 中提出的更改检查 addopts 设置,然后重新运行 21 个测试。完成的标准是测试通过且不再出现关于已弃用选项的警告。
由索引模型根据 Issue 内容生成。
描述
+ /usr/bin/pytest -ra
=========================================================================== test session starts ============================================================================
platform linux -- Python 3.8.12, pytest-6.2.5, py-1.10.0, pluggy-0.13.1
benchmark: 3.4.1 (defaults: timer=time.perf_counter disable_gc=False min_rounds=5 min_time=0.000005 max_time=1.0 calibration_precision=10 warmup=False warmup_iterations=100000)
Using --randomly-seed=661925073
rootdir: /home/tkloczko/rpmbuild/BUILD/contextvars-2.4, configfile: pytest.ini, testpaths: tests
plugins: forked-1.3.0, shutil-1.7.0, virtualenv-1.7.0, expect-1.1.0, flake8-1.0.7, timeout-1.4.2, betamax-0.8.1, freezegun-0.4.2, aspectlib-1.5.2, toolbox-0.5, rerunfailures-9.1.1, requests-mock-1.9.3, cov-2.12.1, flaky-3.7.0, benchmark-3.4.1, xdist-2.3.0, pylama-7.7.1, datadir-1.3.1, regressions-2.2.0, cases-3.6.3, xprocess-0.18.1, black-0.3.12, anyio-3.3.0, asyncio-0.15.1, trio-0.7.0, subtests-0.5.0, isort-2.0.0, hypothesis-6.14.6, mock-3.6.1, profiling-1.7.0, randomly-3.8.0, Faker-8.12.1, nose2pytest-1.0.8, pyfakefs-4.5.1, tornado-0.8.1, twisted-1.13.3
collected 21 items
tests/test_basics.py .....................
============================================================================= warnings summary =============================================================================
../../../../../usr/lib/python3.8/site-packages/_pytest/config/__init__.py:1183
/usr/lib/python3.8/site-packages/_pytest/config/__init__.py:1183: PytestDeprecationWarning: The --strict option is deprecated, use --strict-markers instead.
self.issue_config_time_warning(
-- Docs: https://docs.pytest.org/en/stable/warnings.html
====================================================================== 21 passed, 1 warning in 0.54s =======================================================================
pytest-xprocess reminder::Be sure to terminate the started process by running 'pytest --xkill' if you have not explicitly done so in your fixture with 'xprocess.getinfo(<process_name>).terminate()'.
And here it tis the fix:
--- a/pytest.ini~ 2019-04-01 15:41:13.000000000 +0100
+++ b/pytest.ini 2021-09-04 10:22:39.096735323 +0100
@@ -1,4 +1,4 @@
[pytest]
-addopts = --capture=no --assert=plain --strict --tb native
+addopts = --capture=no --assert=plain --strict-markers --tb native
testpaths = tests
filterwarnings = default
- 主要语言
- Python
- 星标
- 90
- 派生
- 9
- PR 合并指标
- 30 天内没有已合并 PR
环境准备
这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
MagicStack/contextvars 的其他 Issue
-
难度 4/5 3-5 天 新手友好度 20/100
MagicStack/contextvars#18 · 1 条评论 · 1 个 reaction ·
-
难度 2/5 1-3 小时 新手友好度 45/100
MagicStack/contextvars#17 · 1 个 reaction ·
-
难度 3/5 1-2 天 新手友好度 45/100
MagicStack/contextvars#15 · 2 个 reaction ·
-
asyncio support未关闭
难度 5/5 一周以上 新手友好度 25/100
MagicStack/contextvars#2 · 16 条评论 ·
查看 MagicStack/contextvars 的全部 Issue
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 78/100
NousResearch/hermes-plugin-claude-subscription-directsdk#94 ·
维护者通常 1 天内回复
-
namespace operations
难度 2/5 1-3 小时 新手友好度 72/100
EclipseFdn/open-vsx.org#13702 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 82/100
维护者通常 1 天内回复
-
bug
难度 2/5 1-3 小时 新手友好度 76/100
modelscope/ms-swift#10287 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 85/100
modelscope/FunASR#3757 ·
维护者通常 1 天内回复