Closed
Description
🐞 bug report
Affected Rule
Gazelle with # gazelle:python_generation_mode project
Is this a regression?
Yes, the previous version in which this bug was not present was: 0.26.0
Description
A clear and concise description of the problem...Since 0.27.0
, having # gazelle:python_generation_mode project
Gazelle directive is generating an empty py_test
despite __test__.py
not existing.
I believe it is related this change: #1538
For example,
py_test(
name = "folder_test",
imports = ["../.."],
main = "__test__.py",
)
There isn't even a srcs
parameter, so it doesn't even work.
🔬 Minimal Reproduction
- A directory with Python files and a
BUILD.bazel
- No test files
- No
__test__.py
- Add
# gazelle:python_generation_mode project
directive - Run Python Gazelle on that directory
🌍 Your Environment
- Replicated on both MacOS and Ubuntu Linux