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.
This commit is contained in:
Terry Jan Reedy 2021-10-16 18:44:00 -04:00 committed by GitHub
parent b9cdd0fb9c
commit 42ac06dcd2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 13 additions and 3 deletions

View file

@ -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