summaryrefslogtreecommitdiffstats
path: root/Lib/idlelib/idle_test
diff options
context:
space:
mode:
authorTerry Jan Reedy <tjreedy@udel.edu>2021-10-16 22:44:00 (GMT)
committerGitHub <noreply@github.com>2021-10-16 22:44:00 (GMT)
commit42ac06dcd234bdda989dcfe854ac5173337024c9 (patch)
treec85c0b31fa39b9153f9144d0bb3bcaeba31ce568 /Lib/idlelib/idle_test
parentb9cdd0fb9c463c2503a4d854bb6529a9db58fe1b (diff)
downloadcpython-42ac06dcd234bdda989dcfe854ac5173337024c9.zip
cpython-42ac06dcd234bdda989dcfe854ac5173337024c9.tar.gz
cpython-42ac06dcd234bdda989dcfe854ac5173337024c9.tar.bz2
bpo-45495: Add 'case' and 'match' to IDLE completions list. (GH-29000)
Since the keyword list is frozen, only compute it once per session. The colorizer already handles context keywords.
Diffstat (limited to 'Lib/idlelib/idle_test')
-rw-r--r--Lib/idlelib/idle_test/test_autocomplete.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/Lib/idlelib/idle_test/test_autocomplete.py b/Lib/idlelib/idle_test/test_autocomplete.py
index 642bb5d..a811363 100644
--- a/Lib/idlelib/idle_test/test_autocomplete.py
+++ b/Lib/idlelib/idle_test/test_autocomplete.py
@@ -218,6 +218,11 @@ class AutoCompleteTest(unittest.TestCase):
self.assertTrue(acp.open_completions(ac.TAB))
self.text.delete('1.0', 'end')
+ def test_completion_kwds(self):
+ self.assertIn('and', ac.completion_kwds)
+ self.assertIn('case', ac.completion_kwds)
+ self.assertNotIn('None', ac.completion_kwds)
+
def test_fetch_completions(self):
# Test that fetch_completions returns 2 lists:
# For attribute completion, a large list containing all variables, and