tests(runfiles): migrate runfiles tests to pytest_test - #4061
Open
rickeylev wants to merge 3 commits into
Open
Conversation
Migrate runfiles py_test targets to pytest_test so they run under pytest. Update test targets in tests/runfiles/BUILD.bazel to use pytest_test from //tests/support/pytest_test:pytest_test.bzl and remove redundant main attributes.
…mpatibility Keep runfiles_min_python_test and pathlib_min_python_test as py_test so they can test Python 3.10 in WORKSPACE mode without requiring multi-version pip dependencies.
aignas
approved these changes
Aug 17, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Migrate the primary runfiles test targets to pytest_test to standardize
test execution and runner behavior across the test suite.
The main runfiles_test and pathlib_test targets are updated to use
pytest_test. However, the corresponding _min_python_test targets remain
standard py_test targets using standard library unittest. In WORKSPACE
mode, dev_pip dependencies only resolve for Python 3.11, so pytest is
unavailable when testing against Python 3.10; retaining py_test ensures
minimum Python version verification continues to work.