Skip to content

tests(runfiles): migrate runfiles tests to pytest_test - #4061

Open
rickeylev wants to merge 3 commits into
bazel-contrib:mainfrom
rickeylev:migrate_runfiles_pytest_test
Open

tests(runfiles): migrate runfiles tests to pytest_test#4061
rickeylev wants to merge 3 commits into
bazel-contrib:mainfrom
rickeylev:migrate_runfiles_pytest_test

Conversation

@rickeylev

@rickeylev rickeylev commented Aug 16, 2026

Copy link
Copy Markdown
Collaborator

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.

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.
@rickeylev
rickeylev requested a review from aignas as a code owner August 16, 2026 22:17
…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.
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