diff options
author | Yury Selivanov <yselivanov@sprymix.com> | 2016-02-04 19:00:26 (GMT) |
---|---|---|
committer | Yury Selivanov <yselivanov@sprymix.com> | 2016-02-04 19:00:26 (GMT) |
commit | 46f7785e28c17f33252a95a57dd3827811291394 (patch) | |
tree | dafb038037c276386eb8ac8a034d8f69cfa280cb /Lib/test | |
parent | a7eae4016ed2f97b15000022ce0f39e0b271b37c (diff) | |
download | cpython-46f7785e28c17f33252a95a57dd3827811291394.zip cpython-46f7785e28c17f33252a95a57dd3827811291394.tar.gz cpython-46f7785e28c17f33252a95a57dd3827811291394.tar.bz2 |
Issue #25660: Fix a unittest and rlcompleter when readline isn't available
Diffstat (limited to 'Lib/test')
-rw-r--r-- | Lib/test/test_rlcompleter.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/Lib/test/test_rlcompleter.py b/Lib/test/test_rlcompleter.py index 2d5d9c1..853e773 100644 --- a/Lib/test/test_rlcompleter.py +++ b/Lib/test/test_rlcompleter.py @@ -1,4 +1,5 @@ import unittest +import unittest.mock import builtins import rlcompleter @@ -77,6 +78,7 @@ class TestRlcompleter(unittest.TestCase): self.assertEqual(completer.complete('f.b', 0), 'f.bar') self.assertEqual(f.calls, 1) + @unittest.mock.patch('rlcompleter._readline_available', False) def test_complete(self): completer = rlcompleter.Completer() self.assertEqual(completer.complete('', 0), '\t') |