From: Mark Dickinson Date: Mon, 26 Oct 2009 11:59:30 +0000 (+0000) Subject: Skip readline tests if readline module is not available. X-Git-Tag: v2.7a1~245 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=828b39865a0c84741e0362dcea0750344733db69;p=python Skip readline tests if readline module is not available. --- 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):