summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_rlcompleter.py
diff options
context:
space:
mode:
authorRĂ©mi Lapeyre <remi.lapeyre@lenstra.fr>2020-06-30 13:48:15 (GMT)
committerGitHub <noreply@github.com>2020-06-30 13:48:15 (GMT)
commitbd4a3f21454a6012f4353e2255837561fc9f0e6a (patch)
tree145feda1b2af2f6e3fec17f0f4cc67e4c34ba390 /Lib/test/test_rlcompleter.py
parent0c4f0f3b29d84063700217dcf90ad6860ed71c70 (diff)
downloadcpython-bd4a3f21454a6012f4353e2255837561fc9f0e6a.zip
cpython-bd4a3f21454a6012f4353e2255837561fc9f0e6a.tar.gz
cpython-bd4a3f21454a6012f4353e2255837561fc9f0e6a.tar.bz2
bpo-39314: Closes parenthesis when autocompleting for functions that take no arguments (GH-20562)
Diffstat (limited to 'Lib/test/test_rlcompleter.py')
-rw-r--r--Lib/test/test_rlcompleter.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/Lib/test/test_rlcompleter.py b/Lib/test/test_rlcompleter.py
index 0dc1080..ee3019d 100644
--- a/Lib/test/test_rlcompleter.py
+++ b/Lib/test/test_rlcompleter.py
@@ -40,12 +40,12 @@ class TestRlcompleter(unittest.TestCase):
# test with a customized namespace
self.assertEqual(self.completer.global_matches('CompleteM'),
- ['CompleteMe('])
+ ['CompleteMe()'])
self.assertEqual(self.completer.global_matches('eg'),
['egg('])
# XXX: see issue5256
self.assertEqual(self.completer.global_matches('CompleteM'),
- ['CompleteMe('])
+ ['CompleteMe()'])
def test_attr_matches(self):
# test with builtins namespace
@@ -64,7 +64,7 @@ class TestRlcompleter(unittest.TestCase):
['CompleteMe.spam'])
self.assertEqual(self.completer.attr_matches('Completeme.egg'), [])
self.assertEqual(self.completer.attr_matches('CompleteMe.'),
- ['CompleteMe.mro(', 'CompleteMe.spam'])
+ ['CompleteMe.mro()', 'CompleteMe.spam'])
self.assertEqual(self.completer.attr_matches('CompleteMe._'),
['CompleteMe._ham'])
matches = self.completer.attr_matches('CompleteMe.__')
@@ -134,7 +134,7 @@ class TestRlcompleter(unittest.TestCase):
# No opening bracket "(" because we overrode the built-in class
self.assertEqual(completer.complete('memoryview', 0), 'memoryview')
self.assertIsNone(completer.complete('memoryview', 1))
- self.assertEqual(completer.complete('Ellipsis', 0), 'Ellipsis(')
+ self.assertEqual(completer.complete('Ellipsis', 0), 'Ellipsis()')
self.assertIsNone(completer.complete('Ellipsis', 1))
if __name__ == '__main__':