Issue 36419: IDLE autocomplete: refactor and polish code and tests (original) (raw)
Followup to #30348.
Merge try_open_completions_event and _open_completions_later. The latter is only used in the former. Adjust tests to match.
The following in test_open_completions tests >>> "something self.text.insert('1.0', '"t') self.assertTrue(self.autocomplete.open_completions(False, True, True)) This passes with unittest (py -m test.test_idle) but fails with regrtest (py -m test -ugui test_idle), with "None is not true". There are multiple 'return None's in open_completions. Determine which with debug prints and try to pass with regrtest. Success does not depend on the inserted text matching any file in the current working directory.
Increase coverage. Multiple conditionals are only triggered 1 way.