]> granicus.if.org Git - python/commitdiff
Skip readline tests if readline module is not available.
authorMark Dickinson <dickinsm@gmail.com>
Mon, 26 Oct 2009 11:59:30 +0000 (11:59 +0000)
committerMark Dickinson <dickinsm@gmail.com>
Mon, 26 Oct 2009 11:59:30 +0000 (11:59 +0000)
Lib/test/test_readline.py

index a2210d4330145f0d44f06b197377eb90102cdd34..11045c852e905f6bd6ffda3fdb7d240aea2ef0af 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.test_support import run_unittest
+from test.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):