summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_readline.py
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2012-08-11 08:59:45 (GMT)
committerGeorg Brandl <georg@python.org>2012-08-11 08:59:45 (GMT)
commit68fad6fb377db515f536943910895302900caa82 (patch)
treeeadc343c20fc27049ac730dfcbf251eb68aafeee /Lib/test/test_readline.py
parent675a77d8fbddf19737c7c8606e44343c0945df40 (diff)
parent22bfa37ed06e829bbc2e6a247648693983e2be57 (diff)
downloadcpython-68fad6fb377db515f536943910895302900caa82.zip
cpython-68fad6fb377db515f536943910895302900caa82.tar.gz
cpython-68fad6fb377db515f536943910895302900caa82.tar.bz2
Merge with 3.2.
Diffstat (limited to 'Lib/test/test_readline.py')
-rw-r--r--Lib/test/test_readline.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/Lib/test/test_readline.py b/Lib/test/test_readline.py
index 5483dd3..fe74939 100644
--- a/Lib/test/test_readline.py
+++ b/Lib/test/test_readline.py
@@ -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")