Skip to content

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

Merged
caseyduquettesc merged 1 commit intocaseyduquettesc:mainfrom
Benchling-Open-Source:filter_file
Jul 13, 2024
Merged

Do not convert --test_filter a.py to a::py#12
caseyduquettesc merged 1 commit intocaseyduquettesc:mainfrom
Benchling-Open-Source:filter_file

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
@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