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 pytest config section to pyproject.toml #5686

Merged
merged 3 commits into from
Jul 28, 2022
Merged

Conversation

cognifloyd
Copy link
Member

I'm working towards introducing pants. Eventually I would like to use pants to run tests to take advantage of the fine-grained per-file caching of results that accounts for dependencies by python files (pants infers the deps by reading the python files). But, pants uses pytest to run tests not nosetest.

So, this is the first of several PRs that improves our compatibility with pytest. It adds a pytest config section to pyproject.toml. I also included -l (display local vars on test failure) because that is extremely helpful when I encounter a test failure via pytest.

Note: I do not have pytest support completely ironed out, but this is a step in that direction. Don't expect running all our tests with pytest to work yet.

@cognifloyd cognifloyd added this to the 3.8.0 milestone Jul 25, 2022
@cognifloyd cognifloyd self-assigned this Jul 25, 2022
@cognifloyd cognifloyd requested a review from a team July 25, 2022 16:41
@pull-request-size pull-request-size bot added the size/XS PR that changes 0-9 lines. Quick fix/merge. label Jul 25, 2022
@cognifloyd cognifloyd added maintenance no changelog No Changelog.rst needed for this PR tests and removed no changelog No Changelog.rst needed for this PR labels Jul 25, 2022
Copy link
Contributor

@amanda11 amanda11 left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Member

@rush-skills rush-skills left a comment

Choose a reason for hiding this comment

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

LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
maintenance no changelog No Changelog.rst needed for this PR pantsbuild size/XS PR that changes 0-9 lines. Quick fix/merge. tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants