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

Pants: reclassify test utils in BUILD metadata #5926

Merged
merged 5 commits into from
Mar 10, 2023

Conversation

cognifloyd
Copy link
Member

@cognifloyd cognifloyd commented Mar 9, 2023

Background

This is another part of introducing pants, as discussed in various TSC meetings.

Related PRs can be found in:

Overview of this PR

This replaces a 4 python_sources targets with python_test_utils. I excluded the test_*.py files in tests/unit directories since those are already covered by python_tests targets. I didn't bother to add that exclude in st2client/tests/BUILD however, because we keep our actual tests under tests/unit or tests/integration not directly under tests/.

Generally, python_test_utils captures things like conftest.py for pytest. Eventually, we might be able to replace these files with actual conftest.py files once we finish migrating to pytest. In any case, this makes more logical sense to me.

This PR does not make any functional changes - to Pants, python_sources and python_test_utils are functionally equivalent. So, this is a very minor/small PR.

Pants documentation

…ot sources

It makes more sense for the files in the tests directory to be "test_utils"
instead of regular sources. It does not make a functional difference to pants,
but I feel it captures the intent of those files better.

The canonical example of "test_utils" is conftest.py which we might switch to
later once we finish transitioning to pytest.
@cognifloyd cognifloyd added this to the pants milestone Mar 9, 2023
@cognifloyd cognifloyd self-assigned this Mar 9, 2023
@pull-request-size pull-request-size bot added the size/S PR that changes 10-29 lines. Very easy to review. label Mar 9, 2023
@cognifloyd cognifloyd requested a review from a team March 10, 2023 06:37
@cognifloyd cognifloyd merged commit a81d7d3 into master Mar 10, 2023
@cognifloyd cognifloyd deleted the pants-reclassify-test_utils branch March 10, 2023 08:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pantsbuild size/S PR that changes 10-29 lines. Very easy to review. tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants