Skip to content
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

Fix crash in FastFilesCompleter with no prefix #2750

Merged
merged 1 commit into from
Sep 14, 2017

Conversation

evanunderscore
Copy link
Contributor

@evanunderscore evanunderscore commented Sep 4, 2017

Fixes #2748. This fixes the crash without altering the existing behavior.

@coveralls
Copy link

Coverage Status

Coverage remained the same at 91.805% when pulling 4ead5c7 on evanunderscore:fix-filescompleter into 181bd60 on pytest-dev:master.

Copy link
Member

@nicoddemus nicoddemus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you add a quick test to avoid someone introducing a regression by accident in the future? I believe just creating a FastFilesCompleter, call it directly with an empty prefix and asserting the result would be enough.

@evanunderscore
Copy link
Contributor Author

@nicoddemus Thanks for prompting me to write a test - I discovered my fix was actually incorrect. I found a test case that was already testing the completer, so have added an empty string to its inputs.

@coveralls
Copy link

Coverage Status

Coverage remained the same at 91.805% when pulling 6cf515b on evanunderscore:fix-filescompleter into 549f5c1 on pytest-dev:master.

@nicoddemus nicoddemus merged commit ac5c5cc into pytest-dev:master Sep 14, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

_pytest._argcomplete.FastFilesCompleter fails when no prefix specified
3 participants