summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Dickinson <dickinsm@gmail.com>2009-10-26 11:59:30 +0000
committerMark Dickinson <dickinsm@gmail.com>2009-10-26 11:59:30 +0000
commit828b39865a0c84741e0362dcea0750344733db69 (patch)
tree41b0dd386ba390121c42dbab302231e407afebd3
parent8d87dc0c2995a4e1eb5bb889372bc7efe218c3a4 (diff)
downloadcpython-git-828b39865a0c84741e0362dcea0750344733db69.tar.gz
Skip readline tests if readline module is not available.
-rw-r--r--Lib/test/test_readline.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/Lib/test/test_readline.py b/Lib/test/test_readline.py
index a2210d4330..11045c852e 100644
--- a/Lib/test/test_readline.py
+++ b/Lib/test/test_readline.py
@@ -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):