Skip to content

Commit 68e279b

Browse files
authored
gh-121351: Skip test_not_wiping_history_file() if no readline (#121422)
1 parent 1143894 commit 68e279b

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

Lib/test/test_pyrepl/test_pyrepl.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
from unittest.mock import patch
1212
from test.support import force_not_colorized
1313
from test.support import SHORT_TIMEOUT
14+
from test.support.import_helper import import_module
1415
from test.support.os_helper import unlink
1516

1617
from .support import (
@@ -902,6 +903,9 @@ def test_python_basic_repl(self):
902903
self.assertNotIn("Traceback", output)
903904

904905
def test_not_wiping_history_file(self):
906+
# skip, if readline module is not available
907+
import_module('readline')
908+
905909
hfile = tempfile.NamedTemporaryFile(delete=False)
906910
self.addCleanup(unlink, hfile.name)
907911
env = os.environ.copy()

0 commit comments

Comments
 (0)