8000 bpo-30348: IDLE: Add test_autocomplete unittest by mlouielu · Pull Request #2209 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

bpo-30348: IDLE: Add test_autocomplete unittest #2209

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 12 commits into from
Mar 24, 2019

Conversation

mlouielu
Copy link
Contributor
@mlouielu mlouielu commented Jun 15, 2017

@mention-bot
Copy link

@mlouielu, thanks for your PR! By analyzing the history of the files in this pull request, we identified @terryjreedy to be a potential reviewer.

@terryjreedy terryjreedy self-requested a review as a code owner June 27, 2018 00:37
@terryjreedy
Copy link
Member

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.

@terryjreedy
Copy link
Member
terryjreedy commented Mar 24, 2019

I did a new update merge, fixed the merge conflict, and python -m test -ugui test_idle failed 3 successive times. Commenting out the one line (now 160), the same passed 5 times. I will push now with that line disabled to run CI while I investigate. (Pushed with line enabled, disabled in web editor after failure on Azure.)

@terryjreedy terryjreedy added tests Tests in the Lib/test dir needs backport to 3.7 labels Mar 24, 2019
@terryjreedy terryjreedy merged commit 113d735 into python:master Mar 24, 2019
@miss-islington
Copy link
Contributor

Thanks @mlouielu for the PR, and @terryjreedy for merging it 🌮🎉.. I'm working now to backport this PR to: 3.7.
🐍🍒⛏🤖

@bedevere-bot
Copy link

GH-12529 is a backport of this pull request to the 3.7 branch.

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Mar 24, 2019
(cherry picked from commit 113d735)

Co-authored-by: Louie Lu <git@louie.lu>
miss-islington added a commit that referenced this pull request Mar 24, 2019
(cherry picked from commit 113d735)

Co-authored-by: Louie Lu <git@louie.lu>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
0