Description Feature or enhancement
It is defined here:
def no_rerun (reason ):
"""Skip rerunning for a particular test.
WARNING: Use this decorator with care; skipping rerunning makes it
impossible to find reference leaks. Provide a clear reason for skipping the
test using the 'reason' parameter.
"""
def deco (func ):
_has_run = False
def wrapper (self ):
nonlocal _has_run
if _has_run :
self .skipTest (reason )
func (self )
_has_run = True
return wrapper
return deco
and here:
# This is copied from test_import/__init__.py.
# XXX Move it to support/__init__.py.
def no_rerun (reason ):
"""Skip rerunning for a particular test.
WARNING: Use this decorator with care; skipping rerunning makes it
impossible to find reference leaks. Provide a clear reason for skipping the
test using the 'reason' parameter.
"""
def deco (func ):
_has_run = False
def wrapper (self ):
nonlocal _has_run
if _has_run :
self .skipTest (reason )
func (self )
_has_run = True
return wrapper
return deco
Introduced in #119373
Linked PRs
Reactions are currently unavailable
You can’t perform that action at this time.
Feature or enhancement
It is defined here:
cpython/Lib/test/test_import/__init__.py
Lines 123 to 139 in b407ad3
and here:
cpython/Lib/test/datetimetester.py
Lines 50 to 68 in b407ad3
Introduced in #119373
Linked PRs
@no_reruntotest.support#119660support.no_rerundecorator #119675