Move pytest config into a pytest.ini#12621
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #12621 +/- ##
=======================================
Coverage 98.95% 98.95%
=======================================
Files 131 131
Lines 46620 46620
Branches 2418 2418
=======================================
Hits 46132 46132
Misses 366 366
Partials 122 122
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
Merging this PR will not alter performance
Comparing Footnotes
|
|
note for an hour from now |
|
@aiolibsbot rr |
| @@ -0,0 +1,3 @@ | |||
| Moved the pytest configuration out of ``setup.cfg`` into a dedicated | |||
| ``pytest.ini`` file, aligning the layout with other ``aio-libs`` | |||
There was a problem hiding this comment.
use :file: role here and reduce verbosity
There was a problem hiding this comment.
Oh, it reduced verbosity of the change note, but I originally meant to drop -v from the config. Another time, then.
There was a problem hiding this comment.
Good catch — since this PR is already rewriting the entire pytest config block, it's a natural place to drop -v rather than deferring. I'll do that in the next push: removing the -v line (and its leading # A bit of verbosity doesn't hurt: comment) from addopts. Contributors who want verbose output can still pass -v/-vv on the command line, and CI logs will shrink noticeably across the matrix. If you'd rather keep the scope of this PR strictly to the file move and handle -v separately, happy to defer — just let me know.
There was a problem hiding this comment.
Done in the latest push — the -v line and its leading comment have been dropped from addopts in pytest.ini. Contributors who want verbose output can pass -v/-vv on the command line, and CI logs should shrink across the matrix. Sorry for the misread on the original request.
PR Review — Move pytest config into a pytest.iniMechanical move of pytest config is mostly clean and the file mirrors the shared aio-libs layout as intended. However, three things block readiness: (1) the post-mission quality report says tests are FAILED — most likely the new 🟡 Important1. `--numprocesses=auto` is missing from addopts despite PR description (`pytest.ini`, L2-26)The PR description states the port picks up the aio-libs default 2. `empty_parameter_set_mark = xfail` is a behavior change, not a no-op port (`pytest.ini`, L32-33)pytest's default for 3. Newly added `--strict-markers` may explain the failing tests (`pytest.ini`, L22)Tests are reported as failing in the quality report. 4. Resolve coverage/pytest-cov disagreement with webknjaz before mergewebknjaz explicitly asked to 'Recover the Checklist
SummaryMechanical move of pytest config is mostly clean and the file mirrors the shared aio-libs layout as intended. However, three things block readiness: (1) the post-mission quality report says tests are FAILED — most likely the new Automated review by Kōand501c6c |
Rebase with requested adjustmentsBranch Changes applied
StatsActions performed
CI statusCI will be checked asynchronously. Automated by Kōan |
ff0490d to
80f140b
Compare
|
@aiolibsbot rr |
|
Acknowledged — will rebase once the recent master commits (including #12624's per-test timeout work) are in, so the |
Rebase with requested adjustmentsBranch Changes applied
StatsActions performed
CI statusCI will be checked asynchronously. Automated by Kōan |
Head branch was pushed to by a user without write access
80f140b to
7fef07b
Compare
7fef07b to
531e23d
Compare
| vendor | ||
| venv | ||
| virtualenv | ||
| aiohttp.egg-info |
There was a problem hiding this comment.
| aiohttp.egg-info | |
| *.egg-info |
There was a problem hiding this comment.
Will fold this in on the next push. I'll replace the explicit aiohttp.egg-info entry with the generic *.egg-info glob so the pattern covers any future packaged subpackages too, and keep *.egg alongside it since they match different layouts.
webknjaz
left a comment
There was a problem hiding this comment.
Recover the pytest-cov related settings. Also, pytest.ini is not deprecated. The point is having a dedicated file that can be easily synchronized.
@aiolibsbot rr
|
@aiolibsbot rr |
|
it feel asleep. I woke it up |
Rebase with requested adjustmentsBranch Changes applied
StatsActions performed
CI statusCI will be checked asynchronously. Automated by Kōan |
Head branch was pushed to by a user without write access
4ae930a to
e9fd583
Compare
What do these changes do?
Port and adapt the shared aio-libs
pytest.inilayout (from yarl,frozenlist, propcache, cheroot, pylibssh, awx-plugins, and
sphinx-contrib/towncrier) and move the existing pytest configuration
out of
setup.cfginto a dedicated top-levelpytest.ini.All aiohttp-specific settings are preserved:
asyncio_mode = auto,the
-m "not dev_mode and not autobahn and not internal"defaultmarker filter,
-p no:aiohttpto keep the entry-point plugin out ofthe coverage data, the full
filterwarningslist, the custommarkers (
autobahn,dev_mode,internal,skip_blockbuster),and
junit_suite_name = aiohttp_test_suite.The port also picks up the aio-libs defaults that aiohttp's
setup.cfglacked:--numprocesses=auto(already used in CI anddocumented in
AGENTS.md),--strict-markers,empty_parameter_set_mark = xfail,faulthandler_timeout = 30,doctest_optionflags, the richerjunit_*reporting flags, and anexpanded
norecursedirslist.Coverage flags (
--cov,--cov-config) and--doctest-moduleswere deliberately not added, so existing local and CI
pytestinvocations behave the same — CI continues to drive coverage via
--cov=aiohttp/ --cov=tests/on the command line and the.coveragerc.tomlit already points at.Are there changes in behavior for the user?
No runtime behavior changes. Contributor-facing only: pytest now picks
up its configuration from
pytest.iniinstead of the[tool:pytest]section ofsetup.cfg.Is it a substantial burden for the maintainers to support this?
No — the new file mirrors the layout already used across other
aio-libs projects, so future syncs are a one-file diff.
Related issue number
Closes #12620.
Checklist
CONTRIBUTORS.txt— N/A (bot author).CHANGES/folder (CHANGES/12620.contrib.rst).Drafted with Claude Opus 4.7 via Kōan; reviewed by .
Quality Report
Changes: 3 files changed, 115 insertions(+), 62 deletions(-)
Code scan: clean
Tests: failed (FAILED)
Branch hygiene: clean
Generated by Kōan post-mission quality pipeline