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

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

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.

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.

changelog/11013.improvement.rst Outdated Show resolved Hide resolved
src/_pytest/config/__init__.py Outdated Show resolved Hide resolved
@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
25 checks passed
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