Skip to content

Commit 39c632f

Browse files
committed
pythongh-121351: skip test_not_wiping_history_file() if no readline
1 parent 6239d41 commit 39c632f

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
@@ -20,6 +20,7 @@
2020
more_lines,
2121
multiline_input,
2222
code_to_events,
23+
import_module
2324
)
2425
from _pyrepl.console import Event
2526
from _pyrepl.readline import ReadlineAlikeReader, ReadlineConfig
@@ -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)