]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Merged revisions 75711 via svnmerge from
authorMark Dickinson <dickinsm@gmail.com>
Mon, 26 Oct 2009 12:01:06 +0000 (12:01 +0000)
committerMark Dickinson <dickinsm@gmail.com>
Mon, 26 Oct 2009 12:01:06 +0000 (12:01 +0000)
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r75711 | mark.dickinson | 2009-10-26 11:59:30 +0000 (Mon, 26 Oct 2009) | 1 line

  Skip readline tests if readline module is not available.
........

Lib/test/test_readline.py

index b2495a3f131e76cb62420b3ee9e6677d465117f0..5f5a90ac629fc62fc5fc455aba17db50d48e8747 100644 (file)
@@ -6,9 +6,10 @@ the "real" readline have the same interface for history manipulation. That's
 why the tests cover only a small subset of the interface.
 """
 import unittest
-from test.support import run_unittest
+from test.support import run_unittest, import_module
 
-import readline
+# Skip tests if there is no readline module
+readline = import_module('readline')
 
 class TestHistoryManipulation (unittest.TestCase):
     def testHistoryUpdates(self):