Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

bpo-30348: IDLE: Add test_autocomplete unittest#2209

Merged
terryjreedy merged 12 commits into
python:masterpython/cpython:masterfrom
mlouielu:bpo-30348mlouielu/cpython:bpo-30348Copy head branch name to clipboard
Mar 24, 2019
Merged

bpo-30348: IDLE: Add test_autocomplete unittest#2209
terryjreedy merged 12 commits into
python:masterpython/cpython:masterfrom
mlouielu:bpo-30348mlouielu/cpython:bpo-30348Copy head branch name to clipboard

Conversation

@mlouielu

@mlouielu mlouielu commented Jun 15, 2017

Copy link
Copy Markdown
Contributor

@mention-bot

Copy link
Copy Markdown

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

terryjreedy commented Mar 24, 2019

Copy link
Copy Markdown
Member

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
Copy Markdown
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
Copy Markdown

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

Labels

tests Tests in the Lib/test dir

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants

Morty Proxy This is a proxified and sanitized view of the page, visit original site.