mirror of
https://github.com/python/cpython.git
synced 2025-08-31 14:07:50 +00:00
Issue #25660: Fix a unittest and rlcompleter when readline isn't available
This commit is contained in:
parent
a7eae4016e
commit
46f7785e28
2 changed files with 10 additions and 4 deletions
|
@ -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')
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue