• Home
Name Date Size #Lines LOC

..--

test1_unset/04-Jul-2025-2415

test2_star_test_py/04-Jul-2025-2315

test3_test_star_py/04-Jul-2025-2718

test4_glob/04-Jul-2025-2718

test5_multiple_patterns/04-Jul-2025-4529

test6_nesting/04-Jul-2025-4933

README.mdD04-Jul-2025846 2016

WORKSPACED04-Jul-20250

test.yamlD04-Jul-20250 10

README.md

1# Directive: `python_test_file_pattern`
2
3This test case asserts that the `# gazelle:python_test_file_pattern` directive
4works as intended.
5
6It consists of 6 cases:
7
81.  When not set, both `*_test.py` and `test_*.py` files are mapped to the `py_test`
9    rule.
102.  When set to a single value `*_test.py`, `test_*.py` files are mapped to the
11    `py_library` rule.
123.  When set to a single value `test_*.py`, `*_test.py` files are mapped to the
13    `py_library` rule (ie: the inverse of case 2, but also with "file" generation
14    mode).
154.  Arbitrary `glob` patterns are supported.
165.  Multiple `glob` patterns are supported and that patterns don't technically
17    need to end in `.py` if they end in a wildcard (eg: we won't make a `py_test`
18    target for the extensionless file `test_foo`).
196.  Sub-packages can override the directive's value.
20