curved-manchester-66006
10/11/2023, 5:28 PMpython_tests(
name="tests",
sources = ['test_*.py', '*_test.py', 'tests.py', "!test_integration_*.py"]
)
would give
13:25:45.89 [WARN] Unmatched globs from helloworld/greet:tests's `sources` field: ["helloworld/greet/test_*.py", "helloworld/greet/tests.py"], exclude: "helloworld/greet/test_integration_*.py"
if there was not a test_integration_foo.py
file.curved-television-6568
10/11/2023, 5:38 PMcurved-television-6568
10/11/2023, 5:39 PMcurved-manchester-66006
10/11/2023, 5:44 PMconftest.py
give a warning from the default python_sources:
$ pants peek helloworld/greet:lib
[
{
"address": "helloworld/greet:lib",
"target_type": "python_sources",
"dependencies": [
"helloworld/greet/__init__.py:lib",
"helloworld/greet/greeting.py:lib"
],
"description": null,
"overrides": null,
"skip_black": false,
"skip_docformatter": false,
"skip_flake8": false,
"skip_isort": false,
"skip_mypy": false,
"sources": [
"helloworld/greet/__init__.py",
"helloworld/greet/greeting.py"
],
"sources_fingerprint": "e4b3e53d6b26824dab6f469c85a83a27dd89c31516ad493e56b5e735e6ab7430",
"sources_raw": [
"*.py",
"*.pyi",
"!test_*.py",
"!*_test.py",
"!tests.py",
"!conftest.py",
"!test_*.pyi",
"!*_test.pyi",
"!tests.pyi"
],
"tags": null
}
curved-television-6568
10/11/2023, 5:51 PMcurved-television-6568
10/11/2023, 5:52 PMcurved-manchester-66006
10/11/2023, 5:52 PMcurved-television-6568
10/11/2023, 5:52 PMcurved-manchester-66006
10/11/2023, 5:54 PMmy_python_sources
that excludes `!conftest2.py, I'd need to write a plugin with those defaults?curved-television-6568
10/11/2023, 5:55 PMcurved-television-6568
10/11/2023, 5:56 PMcurved-television-6568
10/11/2023, 5:57 PM__defaults__
or similar).. if the file exists where that exclude glob is used, you don’t need to set it in a plugin, of course.curved-manchester-66006
10/11/2023, 6:02 PMcurved-television-6568
10/11/2023, 6:08 PMcurved-television-6568
10/11/2023, 6:08 PM