Kaydet (Commit) 22bfa37e authored tarafından Georg Brandl's avatar Georg Brandl

Closes #15620: check for presence of readline.clear_history(), which is…

Closes #15620: check for presence of readline.clear_history(), which is apparently missing on some readline versions, before calling it in the test.
üst 03b4d507
......@@ -17,7 +17,9 @@ class TestHistoryManipulation (unittest.TestCase):
"The history update test cannot be run because the "
"clear_history method is not available.")
def testHistoryUpdates(self):
readline.clear_history()
# Some GNU versions of readline do not support clear_history
if hasattr('readline', 'clear_history'):
readline.clear_history()
readline.add_history("first line")
readline.add_history("second line")
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment