Skip to content

Commit 47e26c8

Browse files
committed
Revert "Move ReachableCode exception to test.support"
This reverts commit 56a50ca.
1 parent 4898612 commit 47e26c8

File tree

2 files changed

+8
-7
lines changed

2 files changed

+8
-7
lines changed

Lib/test/support/__init__.py

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
# globals
2424
"PIPE_MAX_SIZE", "verbose", "max_memuse", "use_resources", "failfast",
2525
# exceptions
26-
"ReachableCode", "Error", "TestFailed", "TestDidNotRun", "ResourceDenied",
26+
"Error", "TestFailed", "TestDidNotRun", "ResourceDenied",
2727
# io
2828
"record_original_stdout", "get_original_stdout", "captured_stdout",
2929
"captured_stdin", "captured_stderr", "captured_output",
@@ -107,11 +107,6 @@
107107
STDLIB_DIR = os.path.dirname(TEST_HOME_DIR)
108108
REPO_ROOT = os.path.dirname(STDLIB_DIR)
109109

110-
class ReachableCode(Exception):
111-
"""Exception to raise to indicate that some code was reached.
112-
113-
Use this exception if using mocks is not a good alternative.
114-
"""
115110

116111
class Error(Exception):
117112
"""Base class for regression test exceptions."""

Lib/test/test_asyncio/test_futures.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414
import warnings
1515
from test.test_asyncio import utils as test_utils
1616
from test import support
17-
from test.support import ReachableCode
1817

1918

2019
def tearDownModule():
@@ -33,6 +32,13 @@ def last_cb():
3332
pass
3433

3534

35+
class ReachableCode(Exception):
36+
"""Exception to raise to indicate that some code was reached.
37+
38+
Use this exception if using mocks is not a good alternative.
39+
"""
40+
41+
3642
class SimpleEvilEventLoop(asyncio.base_events.BaseEventLoop):
3743
"""Base class for UAF and other evil stuff requiring an evil event loop."""
3844

0 commit comments

Comments
 (0)