Repository navigation
test(project): close the gaps the merge-wave reviews left in the guard tests (#1902) - #1904
Merged
Merged
Conversation
…d tests (#1902) - ast.unparse guard: only the branch of an `if`, or the test under a `skipIf`/`skipUnless`, that runs on 3.9 or later counts as gated, so an `else:` use, a gate pointing the wrong way and a reversed `skipIf` are flagged; `getattr(ast, 'unparse')` counts as a use. - Version-directive guard: match any whitespace after `..`, so `.. versionchanged::` is caught. - Conda pin workflow test: read each `pip install` line as the shell does, ignoring what follows a `#`, and match requirement names, so `requests[socks]` and `requests>=2` count. - time_limit tests that drop the first raise hold the deadline back until the body's `try` arms it, and a new test stalls before that `try`. Closes #1902
Owner
Author
|
Verdict: GOOD TO GO at
Not blocking: the scan accepts |
Contributor
|
Coverage: 90.07% (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. Narrow runs only, listed below.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 elseThese close the four gaps the merge-wave cross-reviews left.
ast.unparsegate (test(project): keep the #1851 and #1878 tests green on the KTLO legs (#1898, #1899) #1900): a use counts as gated only in the branch of a version check that runs on 3.9 or later, or in a test whose skip decorator restricts it there. Theelse:of a<gate counts too.getattr(ast, 'unparse')now counts as a use.\.\.\s+version…, so.. versionchanged::written with two spaces is caught.pip_installs()helper splits withcomments=Trueand matches requirement names. Arequestsafter a#no longer counts, andrequests[socks]andrequests>=2now do.time_limit(1)tests (test(protocols): the #1889 swallowed-raise test can see the deadline arrive without the swallow #1897): they hold back the deadline's first arm until the body is inside itstry, as test(protocols): keep the #1889 spin's first raise inside its try (#1897) #1901 did. A new test that stalls before thetryfails without this.Each new check fails with its fix reverted.
tests/project,tests/test_support_helpers.pyand the tier guard pass on 3.14, and under plainunitteston 3.8 the touched test classes pass.Closes #1902