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

Do not convert --test_filter a.py to a::py #12

Merged

Conversation

raylu
Copy link
Contributor

@raylu raylu commented Jul 12, 2024

Currently, if you try to filter a test target to a file with --test_filter some_test.py,
the shim converts it to some_test::py and deselects all test cases.


To test this change, in our workspace's MODULE.bazel, I added

git_override(
    module_name = "caseyduquettesc_rules_python_pytest",
    remote = "https://github.com/Benchling-Open-Source/rules_python_pytest.git",
    commit = "727a5037ec5b743ac2ffa52bbdd6968b427954be",
)

and ran
$ bazel test //tests/unit/some_target --test_filter some_test.py --test_output streamed
and confirmed that only the tests in some_test.py ran

Copy link
Owner

@caseyduquettesc caseyduquettesc left a comment

Choose a reason for hiding this comment

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

Yikes, thanks!

@caseyduquettesc caseyduquettesc merged commit 5591c0b into caseyduquettesc:main Jul 13, 2024
7 checks passed
@raylu
Copy link
Contributor Author

raylu commented Jul 15, 2024

wow, so fast! released already too! thanks!

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.

2 participants