billowy-motherboard-58443
09/21/2020, 3:14 PMaloof-angle-91616
09/21/2020, 3:14 PMbillowy-motherboard-58443
09/21/2020, 3:15 PMpython_tests(
name = "tests",
dependencies = [
"ns/foo",
]
)
as ns/foo/tests/BUILDaloof-angle-91616
09/21/2020, 3:15 PMbillowy-motherboard-58443
09/21/2020, 3:15 PMaloof-angle-91616
09/21/2020, 3:15 PMns/foo/tests/xx/
, you'll want sources=['**/test_*.py']
or sources=['xx/test_*.py']
aloof-angle-91616
09/21/2020, 3:17 PMns
with:
python_tests(
name = "tests",
sources = ['**/test_*.py'],
...
)
aloof-angle-91616
09/21/2020, 3:17 PM./pants test ns:tests
aloof-angle-91616
09/21/2020, 3:17 PMbillowy-motherboard-58443
09/21/2020, 3:17 PMbillowy-motherboard-58443
09/21/2020, 3:18 PMpython_tests(
name = "tests",
dependencies = [
"ns/foo",
]
)
aloof-angle-91616
09/21/2020, 3:18 PMaloof-angle-91616
09/21/2020, 3:19 PMsources=['test_*.py']
is inferred if none is provided, for python_tests()
targetsbillowy-motherboard-58443
09/21/2020, 3:19 PMbillowy-motherboard-58443
09/21/2020, 3:19 PMtest_*.py
?aloof-angle-91616
09/21/2020, 3:19 PM./pants test ns/foo/tests/x_test.py
aloof-angle-91616
09/21/2020, 3:20 PMtest_*.py
but i haven't checked in a while and am more likely to be wrong than you arebillowy-motherboard-58443
09/21/2020, 3:20 PMaloof-angle-91616
09/21/2020, 3:20 PMclass PythonTestsSources(PythonSources):
default = ("test_*.py", "*_test.py", "tests.py", "conftest.py")
aloof-angle-91616
09/21/2020, 3:21 PMbillowy-motherboard-58443
09/21/2020, 3:21 PMaloof-angle-91616
09/21/2020, 3:21 PMaloof-angle-91616
09/21/2020, 3:21 PMaloof-angle-91616
09/21/2020, 3:23 PMbillowy-motherboard-58443
09/21/2020, 3:23 PMbillowy-motherboard-58443
09/21/2020, 3:48 PMaloof-angle-91616
09/21/2020, 3:48 PMbillowy-motherboard-58443
09/21/2020, 3:49 PMns/config
- trying to sort what belongs in ns/config/BUILD and ns/config/test/BUILDbillowy-motherboard-58443
09/21/2020, 3:49 PMaloof-angle-91616
09/21/2020, 3:50 PM