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 test failure with descriptive error message when running tests without a {project} placeholder #1336

Merged
merged 5 commits into from Dec 5, 2022

Conversation

joerick
Copy link
Contributor

@joerick joerick commented Nov 6, 2022

Fixes #621

@joerick joerick marked this pull request as ready for review November 26, 2022 11:08
@joerick
Copy link
Contributor Author

joerick commented Dec 5, 2022

@henryiii any chance of a review on this one too? :)

@henryiii
Copy link
Contributor

henryiii commented Dec 5, 2022

Ahh, I thought this was a test: ... PR but I see it's really a fix: ... PR. Okay, can do.

# pytest is run from there


def test():
Copy link
Contributor

Choose a reason for hiding this comment

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

This assumes pytest. Would it make more sense to write it in unittest, which pytest will also pick up and run? I'm assuming this still won't get other testing frameworks (like ward), but this might be better than just assuming pytest?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

good idea! I'll try that

Copy link
Contributor

@henryiii henryiii left a comment

Choose a reason for hiding this comment

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

LGTM, minus one comment about the testing frameworks covered.

Also I assume if someone has testpaths= in their pyproject.toml or elsewhere, that won't get picked up (since it's in the wrong directory) so the "error message" test file will still get run. 👍

@joerick joerick added the automerge Tells https://github.com/apps/mergery to squash-merge the PR when the button is green. label Dec 5, 2022
@joerick
Copy link
Contributor Author

joerick commented Dec 5, 2022

Travis is having a slow day today 😴

@joerick joerick merged commit ecce3d9 into main Dec 5, 2022
@joerick joerick deleted the test-cwd-error-message branch December 5, 2022 21:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
automerge Tells https://github.com/apps/mergery to squash-merge the PR when the button is green.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Improve the error message of a misconfigured CIBW_TEST_COMMAND [was "bracex not installed, so pytest fails"]
2 participants