Uh oh!
There was an error while loading. Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork 34k
Closed
Labels
testsTests in the Lib/test dirTests in the Lib/test dirtype-featureA feature request or enhancementA feature request or enhancement
Description
Feature or enhancement
It is defined here:
cpython/Lib/test/test_import/__init__.py
Lines 123 to 139 in b407ad3
| defno_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. | |
| """ | |
| defdeco(func): | |
| _has_run=False | |
| defwrapper(self): | |
| nonlocal_has_run | |
| if_has_run: | |
| self.skipTest(reason) | |
| func(self) | |
| _has_run=True | |
| returnwrapper | |
| returndeco |
and here:
cpython/Lib/test/datetimetester.py
Lines 50 to 68 in b407ad3
| # This is copied from test_import/__init__.py. | |
| # XXX Move it to support/__init__.py. | |
| defno_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. | |
| """ | |
| defdeco(func): | |
| _has_run=False | |
| defwrapper(self): | |
| nonlocal_has_run | |
| if_has_run: | |
| self.skipTest(reason) | |
| func(self) | |
| _has_run=True | |
| returnwrapper | |
| returndeco |
Introduced in #119373
Linked PRs
Metadata
Metadata
Assignees
Labels
testsTests in the Lib/test dirTests in the Lib/test dirtype-featureA feature request or enhancementA feature request or enhancement