-
-
Notifications
You must be signed in to change notification settings - Fork 344
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
get and enforce 100% coverage #3159
Merged
Merged
Changes from 7 commits
Commits
Show all changes
42 commits
Select commit
Hold shift + click to select a range
2aa5771
test waitid on linux even with pidfd support
graingert 8501b0c
refactor duplicate code in gen_exports
graingert be08460
more coverage in test_dtls
graingert 2722418
cover monitors
graingert 8858398
test cancel wait without pidfd
graingert e5fa8cd
test OSError in waitid
graingert 340373d
Update src/trio/_core/_tests/test_io.py
graingert d436b06
Update src/trio/_core/_tests/test_io.py
graingert 0ac717d
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] 1398349
Merge branch 'main' into 100-coverage
graingert 34d6399
filterwarning
graingert 818094a
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] 3dac42d
try two assertions
graingert dda9a27
ok what, this is very strange, but works.
graingert bd81624
no cover some unreachable pytest.fail code
graingert 640f581
remove some unused code from test_subprocess.py
graingert 50d848d
always use SSL_OP_NO_TLSv1_3 - now that it's available
graingert 28ee44a
cowardly hide from the coverage check using a ternery
graingert ac30b6b
Revert "more coverage in test_dtls"
graingert f312a70
an empty string joined with '' is a noop, so this branch is redundant
graingert badc910
test errors in CancelScope ctor
graingert a57247a
cover code in the contextvars counter
graingert 5344e71
test more of kqueue
graingert 8f05dbf
actually enter the cmgr
graingert 1ec824c
no cover unreachable cmgr inside
graingert a0f33ee
remove await - it seems to timeout
graingert cc4b217
add newsfragment
graingert 24917b7
bump the lower end of the coverage range
graingert 68de044
add todo to nocov
graingert 95b1f75
ignore some coverage with TODOs
graingert becdf2a
assert there's no node in cached_type_info
graingert 3f34731
require 100% coverage
graingert bd097dd
Update .codecov.yml
graingert dcfe01a
Merge branch 'main' into 100-coverage
graingert 431f2ed
more TODO comments
graingert 117fe04
add one last TODO
graingert 84de11a
fix patches comment in .codecov.yml
graingert 2484749
swap branch for line in dtls
graingert d055b38
Update newsfragments/3159.misc.rst
graingert afa13f5
Update src/trio/_tests/test_exports.py
graingert e78f317
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] d962e05
Update src/trio/_tools/gen_exports.py
graingert File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
From mypy run annotations, looks like you need to inform mypy that you don't expect this function to run on windows or linux, because mypy doesn't understand
pytest.mark.skipif
.I suggest something like this:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@CoolCat467 perhaps,
assert_never()
?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Or better yet
assert sys.platform not in {"win32", "linux"}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I couldn't get either option working (assert sys.platform != "win32" and sys.platform != "linux") does work in the playground, and if I create a new file.