summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_rlcompleter.py
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2015-09-27 10:26:03 (GMT)
committerSerhiy Storchaka <storchaka@gmail.com>2015-09-27 10:26:03 (GMT)
commit8ace8e99b375f978111b62f2cc976ce4f55ecd6b (patch)
treec2b9862eb978830e5b986eeb23503e05bec4053d /Lib/test/test_rlcompleter.py
parent36b3fbb0ee6e266381cec91a0a3c15fd403c3cfd (diff)
downloadcpython-8ace8e99b375f978111b62f2cc976ce4f55ecd6b.zip
cpython-8ace8e99b375f978111b62f2cc976ce4f55ecd6b.tar.gz
cpython-8ace8e99b375f978111b62f2cc976ce4f55ecd6b.tar.bz2
Issue #25209: rlcomplete now can add a space or a colon after completed keyword.
Diffstat (limited to 'Lib/test/test_rlcompleter.py')
-rw-r--r--Lib/test/test_rlcompleter.py13
1 files changed, 9 insertions, 4 deletions
diff --git a/Lib/test/test_rlcompleter.py b/Lib/test/test_rlcompleter.py
index d37b620..11a8305 100644
--- a/Lib/test/test_rlcompleter.py
+++ b/Lib/test/test_rlcompleter.py
@@ -67,10 +67,15 @@ class TestRlcompleter(unittest.TestCase):
def test_complete(self):
completer = rlcompleter.Completer()
self.assertEqual(completer.complete('', 0), '\t')
- self.assertEqual(completer.complete('a', 0), 'and')
- self.assertEqual(completer.complete('a', 1), 'as')
- self.assertEqual(completer.complete('as', 2), 'assert')
- self.assertEqual(completer.complete('an', 0), 'and')
+ self.assertEqual(completer.complete('a', 0), 'and ')
+ self.assertEqual(completer.complete('a', 1), 'as ')
+ self.assertEqual(completer.complete('as', 2), 'assert ')
+ self.assertEqual(completer.complete('an', 0), 'and ')
+ self.assertEqual(completer.complete('pa', 0), 'pass')
+ self.assertEqual(completer.complete('Fa', 0), 'False')
+ self.assertEqual(completer.complete('el', 0), 'elif ')
+ self.assertEqual(completer.complete('el', 1), 'else')
+ self.assertEqual(completer.complete('tr', 0), 'try:')
if __name__ == '__main__':
unittest.main()