Skip to content

Commit

Permalink
Revert "Move ReachableCode exception to test.support"
Browse files Browse the repository at this point in the history
This reverts commit 56a50ca.
  • Loading branch information
picnixz committed Oct 31, 2024
1 parent 02415df commit af8614d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
7 changes: 1 addition & 6 deletions Lib/test/support/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
# globals
"PIPE_MAX_SIZE", "verbose", "max_memuse", "use_resources", "failfast",
# exceptions
"ReachableCode", "Error", "TestFailed", "TestDidNotRun", "ResourceDenied",
"Error", "TestFailed", "TestDidNotRun", "ResourceDenied",
# io
"record_original_stdout", "get_original_stdout", "captured_stdout",
"captured_stdin", "captured_stderr", "captured_output",
Expand Down Expand Up @@ -107,11 +107,6 @@
STDLIB_DIR = os.path.dirname(TEST_HOME_DIR)
REPO_ROOT = os.path.dirname(STDLIB_DIR)

class ReachableCode(Exception):
"""Exception to raise to indicate that some code was reached.
Use this exception if using mocks is not a good alternative.
"""

class Error(Exception):
"""Base class for regression test exceptions."""
Expand Down
8 changes: 7 additions & 1 deletion Lib/test/test_asyncio/test_futures.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
import warnings
from test.test_asyncio import utils as test_utils
from test import support
from test.support import ReachableCode


def tearDownModule():
Expand All @@ -33,6 +32,13 @@ def last_cb():
pass


class ReachableCode(Exception):
"""Exception to raise to indicate that some code was reached.
Use this exception if using mocks is not a good alternative.
"""


class SimpleEvilEventLoop(asyncio.base_events.BaseEventLoop):
"""Base class for UAF and other evil stuff requiring an evil event loop."""

Expand Down

0 comments on commit af8614d

Please sign in to comment.