summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_pyrepl/test_pyrepl.py
diff options
context:
space:
mode:
authorSergey B Kirpichev <skirpichev@gmail.com>2024-07-06 22:53:54 (GMT)
committerGitHub <noreply@github.com>2024-07-06 22:53:54 (GMT)
commit68e279b37aae3019979a05ca55f462b11aac14be (patch)
treefed2010c23aa27e4f5d8eb8ccab9747a25921c1e /Lib/test/test_pyrepl/test_pyrepl.py
parent114389470ec3db457c589b3991b695258d23ce5a (diff)
downloadcpython-68e279b37aae3019979a05ca55f462b11aac14be.zip
cpython-68e279b37aae3019979a05ca55f462b11aac14be.tar.gz
cpython-68e279b37aae3019979a05ca55f462b11aac14be.tar.bz2
gh-121351: Skip test_not_wiping_history_file() if no readline (#121422)
Diffstat (limited to 'Lib/test/test_pyrepl/test_pyrepl.py')
-rw-r--r--Lib/test/test_pyrepl/test_pyrepl.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/Lib/test/test_pyrepl/test_pyrepl.py b/Lib/test/test_pyrepl/test_pyrepl.py
index 7621b8a..015b690 100644
--- a/Lib/test/test_pyrepl/test_pyrepl.py
+++ b/Lib/test/test_pyrepl/test_pyrepl.py
@@ -11,6 +11,7 @@ from unittest import TestCase, skipUnless
from unittest.mock import patch
from test.support import force_not_colorized
from test.support import SHORT_TIMEOUT
+from test.support.import_helper import import_module
from test.support.os_helper import unlink
from .support import (
@@ -902,6 +903,9 @@ class TestMain(TestCase):
self.assertNotIn("Traceback", output)
def test_not_wiping_history_file(self):
+ # skip, if readline module is not available
+ import_module('readline')
+
hfile = tempfile.NamedTemporaryFile(delete=False)
self.addCleanup(unlink, hfile.name)
env = os.environ.copy()