commit | 27276b6de1362a1ed9c1f681e4b3f53aa8bcdbcf | [log] [tgz] |
---|---|---|
author | Morten Mjelva <morten.mjelva@gmail.com> | Tue Sep 17 22:58:14 2024 +0200 |
committer | GitHub <noreply@github.com> | Tue Sep 17 20:58:14 2024 +0000 |
tree | 0522dde12e91eea0dc1f9c156ee5d3ba53d12b33 | |
parent | 654b4d54eeee13f46fd678c28252be22e2feb533 [diff] |
fix: Prefix bootstrap file to prevent pytest reentrance (#2230) Pytest will, by default, discover tests in files named `test_*.py`. The existing behaviour of the bootstrap setup is to create a file named e.g. `test_foo_stage2_bootstrap.py` for a target named `test_foo`. This causes pytest to reenter, leading to a crash. To fix, prepend the generated stage2 file with an underscore so that pytest doesn't match it. --------- Co-authored-by: Richard Levasseur <richardlev@gmail.com>
This repository is the home of the core Python rules -- py_library
, py_binary
, py_test
, py_proto_library
, and related symbols that provide the basis for Python support in Bazel. It also contains package installation rules for integrating with PyPI and other indices.
Documentation for rules_python is at https://rules-python.readthedocs.io and in the Bazel Build Encyclopedia.
Examples live in the examples directory.
The core rules are stable. Their implementation is subject to Bazel's backward compatibility policy. This repository aims to follow semantic versioning.
The Bazel community maintains this repository. Neither Google nor the Bazel team provides support for the code. However, this repository is part of the test suite used to vet new Bazel releases. See How to contribute page for information on our development workflow.
For detailed documentation, see https://rules-python.readthedocs.io
See Bzlmod support for more details.