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