Repository navigation
test: run the 3.9+ and 3.10+ stdlib tests on every supported Python (#1695) - #1697
Merged
Merged
Conversation
…1695) - assertNoLogs is 3.10+: test_dumper_roundtrip_unit uses a local assert_no_logs that takes the logger over the same way. - tuple[str] as a class-base subscript is 3.9+: the reassembly and extraction tests spell it typing.Tuple[str]. On 3.8 the collision case in test_reassembly_base passed only because tuple[str] itself raised the TypeError it expected. - ast.unparse is 3.9+: test_documentation_claims, the apptype composite sweep and test_extraction read nodes back with ast.get_source_segment; test_final_enforcement compares the compat guard with ast.dump, so reformatting it still does not fail the test. - test_module_isolation names the nested tests that failed instead of blaming collection order (#660) for every nested failure. The seven modules: 109 passed on 3.8.20, 3.9.25, 3.10.21 and 3.14.8.
Owner
Author
|
Verdict: GOOD TO GO at |
Contributor
|
Coverage: 89.47% (unit tier, Python 3.15,
Per-file detail: the |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Please follow the guide below
You will be asked some questions, please read them carefully and answer honestly
Put an
xinto all the boxes [ ] relevant to your pull request (like that [x])Use Preview tab to see how your pull request will actually look like
Searched for similar pull requests
Followed the coding style (
make pylint,make mypy,make isort)make testpasses, and a test case covers the change. Only the seven touched modules were run, not the whole suite.Added a changelog entry under
docs/source/changelog/and regeneratedCHANGELOG.md, if the change is user-visible: N/A — centralised in docs(changelog): shared 1.5.0 changelog — long-lived, merges last (#610, #616, #617, #618, #620) #657What is the purpose of your pull request?
Tick the commit type your subject line carries.
fix— corrects a defectfeat— adds a featureperf— changes performance, not behaviourrefactor— changes neither behaviour nor performancetest— tests onlydocs— documentation onlyci— workflows or build toolingrelease— bumps the version or rolls up a distributionchore— anything elseDescription of your pull request and other information
The 13 KTLO failures from #1695 now run on 3.8 and 3.9. Nothing is skipped.
assertNoLogs(3.10+) is replaced by a localassert_no_logsthat takes the logger over the same way. On 3.8 it catches the dumper's realunsupported object typewarning.tuple[str]used as a class base becomestyping.Tuple[str]. Before this, thename=collision case intest_reassembly_base.pypassed on 3.8 by accident:tuple[str]raised theTypeErrorthe test was waiting for. It now raises__new__() got multiple values for argument 'name'.ast.unparse(3.9+) becomesast.get_source_segmentwhere the tests match text.test_final_enforcement.pycomparesast.dumptrees, so reformatting the guard still passes and moving the boundary still fails. The same change also covers the bare-annotation branch attest_extraction.py:201, which the KTLO legs never reached.test_module_isolation.pyused to blame twelve tests/project/ tests fail withTypeError: type 'ProtocolBase' is not subscriptabledepending on what ran first: the fake-module helpers purge on entry and never restore on exit #660 for any failure in its nested run. It now names the nested tests that failed. With the oldtest_documentation_claims.pyon 3.8, the message namesTestNoEOFDocumentedOnce::test_documented_sense_matches_the_code.On
origin/main, 3.8 fails 13 and 3.9 fails 1. After the change, the seven modules pass 109 tests on 3.8.20, 3.9.25, 3.10.21 and 3.14.8. The 3.14 run still has 1843 subtests and 0 skips, the same as before.Two leftovers outside these files:
tests/test_base_class_contract.py:249callsstr.removesuffix(3.9+). It never runs today becausePENDING_ALIAS_PATHSis empty. Thetype[...] | type[...]attests/dumpkit/test_nameless_enum_rendering_unit.py:18sits underTYPE_CHECKING, so it is never evaluated.Closes #1695