8000 gh-110722: Make `-m test -T -j` use sys.monitoring by ambv · Pull Request #111710 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

gh-110722: Make -m test -T -j use sys.monitoring #111710

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

Merged
merged 7 commits into from
Nov 10, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Make patchcheck happy
  • Loading branch information
ambv committed Nov 6, 2023
commit 3a0688bfab2b88bcb47b65cbb5218e5ae793a006
16 changes: 8 additions & 8 deletions Lib/test/support/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -1084,14 +1084,14 @@ def no_tracing(func):
"""Decorator to temporarily turn off tracing for the duration of a test."""
trace_wrapper = func
if hasattr(sys, 'gettrace'):
@functools.wraps(func)
def trace_wrapper(*args, **kwargs):
original_trace = sys.gettrace()
try:
sys.settrace(None)
return func(*args, **kwargs)
finally:
sys.settrace(original_trace)
@functools.wraps(func)
def trace_wrapper(*args, **kwargs):
original_trace = sys.gettrace()
try:
sys.settrace(None)
return func(*args, **kwargs)
finally:
sys.settrace(original_trace)

coverage_wrapper = trace_wrapper
if 'test.cov' in sys.modules: # -Xpresite=test.cov used
Expand Down
0