summaryrefslogtreecommitdiffstats
path: root/Lib/idlelib/idle_test/test_autocomplete.py
diff options
context:
space:
mode:
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>2021-10-16 23:14:11 (GMT)
committerGitHub <noreply@github.com>2021-10-16 23:14:11 (GMT)
commita29470307308f64af9c55263cdd6e1984ba89925 (patch)
tree1ce6fe7dfa445dad26270ad3d902a5df97d2f84b /Lib/idlelib/idle_test/test_autocomplete.py
parent5df35faf3611b459f7f32bfe9fd2ffa7fb2dc59e (diff)
downloadcpython-a29470307308f64af9c55263cdd6e1984ba89925.zip
cpython-a29470307308f64af9c55263cdd6e1984ba89925.tar.gz
cpython-a29470307308f64af9c55263cdd6e1984ba89925.tar.bz2
[3.10] bpo-45495: Add 'case' and 'match' to IDLE completions list. (GH-29000) (GH-29001)
Since the keyword list is frozen, only compute it once per session. The colorizer already handles context keywords. (cherry picked from commit 42ac06dcd234bdda989dcfe854ac5173337024c9) Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu> Automerge-Triggered-By: GH:terryjreedy
Diffstat (limited to 'Lib/idlelib/idle_test/test_autocomplete.py')
-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