mirror of
https://github.com/python/cpython.git
synced 2025-10-25 18:54:53 +00:00
gh-135621: Remove dependency on curses from PyREPL (GH-136758)
This commit is contained in:
parent
d1d526afe7
commit
09dfb50f1b
11 changed files with 1229 additions and 160 deletions
|
|
@ -9,10 +9,10 @@
|
|||
import sys
|
||||
import tempfile
|
||||
from pkgutil import ModuleInfo
|
||||
from unittest import TestCase, skipUnless, skipIf
|
||||
from unittest import TestCase, skipUnless, skipIf, SkipTest
|
||||
from unittest.mock import patch
|
||||
from test.support import force_not_colorized, make_clean_env, Py_DEBUG
|
||||
from test.support import SHORT_TIMEOUT, STDLIB_DIR
|
||||
from test.support import has_subprocess_support, SHORT_TIMEOUT, STDLIB_DIR
|
||||
from test.support.import_helper import import_module
|
||||
from test.support.os_helper import EnvironmentVarGuard, unlink
|
||||
|
||||
|
|
@ -38,6 +38,10 @@
|
|||
|
||||
|
||||
class ReplTestCase(TestCase):
|
||||
def setUp(self):
|
||||
if not has_subprocess_support:
|
||||
raise SkipTest("test module requires subprocess")
|
||||
|
||||
def run_repl(
|
||||
self,
|
||||
repl_input: str | list[str],
|
||||
|
|
@ -1371,6 +1375,7 @@ def setUp(self):
|
|||
# Cleanup from PYTHON* variables to isolate from local
|
||||
# user settings, see #121359. Such variables should be
|
||||
# added later in test methods to patched os.environ.
|
||||
super().setUp()
|
||||
patcher = patch('os.environ', new=make_clean_env())
|
||||
self.addCleanup(patcher.stop)
|
||||
patcher.start()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue