bpo-30348: IDLE: Add test_autocomplete unittest by mlouielu · Pull Request #2209 · python/cpython
The test that failed on the two Windows bots after the update merge is this:
FAIL: test_open_completions (idlelib.idle_test.test_autocomplete.AutoCompleteTest)
Traceback (most recent call last):
File "C:\projects\cpython\lib\idlelib\idle_test\test_autocomplete.py", line 157, in test_open_completions
self.assertTrue(self.autocomplete.open_completions(False, True, True))
AssertionError: None is not true
It sometimes failed for me when run by test.regrtest, but never did when running directly under unittest.
The tests for _open_completions_later and _delayed_open_completion do not be duplicated for attributes and files as the mode has no impact on those functions. I used the second test instead for better coverage.
I documented within open_completions the three possible calls and the arguments passed by each. We only need to test those 3 combinations and not the 5 others never used. The modes are only used for the delayed calls after . in code or / in strings. The False, True, True pattern in the failure is the one for a tab withing a string.