Skip to content

Add warning when testpaths is set but paths are not found by glob #11044

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 6 commits into from
May 30, 2023

Conversation

kenny-y-dev
Copy link
Contributor

Closes #11013

Used PytestConfigWarning and setting warning_text string for message to follow convention for some of the other warnings, and set stacklevel to 3 so it shows the warning thrown by parse function. Tried to make the message concise, but if unclear please let me know and I can change!

Tested against steps to reproduce from #11006 and warning is shown.

Verified

This commit was signed with the committer’s verified signature.
kenny-y-dev Kenny Y

Verified

This commit was signed with the committer’s verified signature.
kenny-y-dev Kenny Y
Copy link
Member

@bluetech bluetech left a comment

Choose a reason for hiding this comment

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

Thanks @kenny-y-dev, I think this warning is good to have. I left a couple of suggestions.

kenny-y-dev and others added 4 commits May 28, 2023 08:02

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
Co-authored-by: Ran Benita <[email protected]>

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
Co-authored-by: Ran Benita <[email protected]>

Verified

This commit was signed with the committer’s verified signature.
kenny-y-dev Kenny Y

Verified

This commit was signed with the committer’s verified signature.
kenny-y-dev Kenny Y
@kenny-y-dev
Copy link
Contributor Author

Thanks for the changes to the wording, definitely more clear now. Updated the test to reflect the changes.

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.

Thanks @kenny-y-dev!

@nicoddemus nicoddemus merged commit 7c231ba into pytest-dev:main May 30, 2023
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.

Issue warning/error if 'testpaths' does not match any files/folders
3 participants