-
-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
ref: add fixture to prevent leaked signal handlers #88740
Conversation
Codecov ReportAttention: Patch coverage is ✅ All tests successful. No failed tests found.
Additional details and impacted files@@ Coverage Diff @@
## master #88740 +/- ##
=======================================
Coverage 87.71% 87.72%
=======================================
Files 10076 10076
Lines 569898 569913 +15
Branches 22387 22387
=======================================
+ Hits 499913 499935 +22
+ Misses 69586 69579 -7
Partials 399 399 |
991fbf8
to
e7de77d
Compare
e7de77d
to
9b4a627
Compare
got is not None | ||
and not isinstance(got, int) | ||
and got is not signal.default_int_handler |
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.
How come this special casing?
Surely if these differ before vs after there's something unhygeinic going on, and the difference between SIG_IGN SIG_DFL and None seems significant, to me.
At least comment and explain?
@pytest.fixture(autouse=True) | ||
def check_leaked_signals() -> Generator[None]: | ||
before = frozenset(_leaked_signals()) | ||
yield |
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.
Neat, learned about pytest yield fixtures today :)
<!-- Describe your PR here. -->
No description provided.