From: Berker Peksag Date: Mon, 27 Jul 2015 21:08:24 +0000 (+0300) Subject: Issue #23441: rcompleter now prints a tab character instead of displaying X-Git-Tag: v3.5.0rc1~85 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=0659c43d73e5d9ce4540c53f76b66ddb904be6de;p=thirdparty%2FPython%2Fcpython.git Issue #23441: rcompleter now prints a tab character instead of displaying possible completions for an empty word. Initial patch by Martin Sekera. --- 0659c43d73e5d9ce4540c53f76b66ddb904be6de diff --cc Lib/test/test_rlcompleter.py index 9d4d0bdeaf24,2da7fce3f03f..d37b620b7a45 --- a/Lib/test/test_rlcompleter.py +++ b/Lib/test/test_rlcompleter.py @@@ -64,5 -64,14 +64,13 @@@ class TestRlcompleter(unittest.TestCase ['egg.{}('.format(x) for x in dir(str) if x.startswith('s')]) + 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') + - if __name__ == '__main__': unittest.main() diff --cc Misc/NEWS index 209daf98045a,9bacb3ab03e8..4a7aca46b66d --- a/Misc/NEWS +++ b/Misc/NEWS @@@ -42,6 -66,11 +42,9 @@@ Core and Builtin Library ------- + - Issue #23441: rcompleter now prints a tab character instead of displaying + possible completions for an empty word. Initial patch by Martin Sekera. + -- Issue #17527: Add PATCH to wsgiref.validator. Patch from Luca Sbardella. - - Issue #24683: Fixed crashes in _json functions called with arguments of inappropriate type.