aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/Lib/test/test_pyrepl
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/test/test_pyrepl')
-rw-r--r--Lib/test/test_pyrepl/support.py10
-rw-r--r--Lib/test/test_pyrepl/test_pyrepl.py3
2 files changed, 1 insertions, 12 deletions
diff --git a/Lib/test/test_pyrepl/support.py b/Lib/test/test_pyrepl/support.py
index 672d4896c92..45e3bf758f1 100644
--- a/Lib/test/test_pyrepl/support.py
+++ b/Lib/test/test_pyrepl/support.py
@@ -101,16 +101,6 @@ handle_events_narrow_console = partial(
)
-def make_clean_env() -> dict[str, str]:
- clean_env = os.environ.copy()
- for k in clean_env.copy():
- if k.startswith("PYTHON"):
- clean_env.pop(k)
- clean_env.pop("FORCE_COLOR", None)
- clean_env.pop("NO_COLOR", None)
- return clean_env
-
-
class FakeConsole(Console):
def __init__(self, events, encoding="utf-8") -> None:
self.events = iter(events)
diff --git a/Lib/test/test_pyrepl/test_pyrepl.py b/Lib/test/test_pyrepl/test_pyrepl.py
index f29a7ffbd7c..bbe19612437 100644
--- a/Lib/test/test_pyrepl/test_pyrepl.py
+++ b/Lib/test/test_pyrepl/test_pyrepl.py
@@ -10,7 +10,7 @@ import sys
import tempfile
from unittest import TestCase, skipUnless, skipIf
from unittest.mock import patch
-from test.support import force_not_colorized
+from test.support import force_not_colorized, make_clean_env
from test.support import SHORT_TIMEOUT
from test.support.import_helper import import_module
from test.support.os_helper import unlink
@@ -23,7 +23,6 @@ from .support import (
multiline_input,
code_to_events,
clean_screen,
- make_clean_env,
)
from _pyrepl.console import Event
from _pyrepl.readline import (ReadlineAlikeReader, ReadlineConfig,