wide-zoo-86070
05/03/2022, 4:35 PM--changed-dependees
, suppose I have two tests in unit/A_test.py
and unit/B_test.py
and I only modified the A_test.py
. It seem, if I run ./pants --changed-since=origin/master --changed-dependees=transitive test
, the test in B_test.py also got triggered even B_test.py
does not depend on A_test.py
. I am wondering why? it is because they shared the same BUILD file unit/BUILD
?hundreds-father-404
05/03/2022, 4:35 PMwide-zoo-86070
05/03/2022, 4:35 PMhundreds-father-404
05/03/2022, 4:36 PMwide-zoo-86070
05/03/2022, 4:45 PMhundreds-father-404
05/03/2022, 4:46 PM./pants paths --from=helloworld/tests_a.py --to=helloworld/tests_b.py
wide-zoo-86070
05/03/2022, 4:46 PM./pants paths --from=project_a/test_helloworld/unit/greeting_test.py --to=project_a/test_helloworld/unit/translator_test.py
12:45:13.69 [ERROR] 1 Exception encountered:
ResolveError: 'unit' was not found in namespace 'project_a/test_helloworld/unit'. Did you mean one of:
:tests
wide-zoo-86070
05/03/2022, 4:47 PMpython_tests(name="tests", tags=["unit_test"])
This is the BUILD file under project_a/test_helloworld/unithundreds-father-404
05/03/2022, 4:50 PM./pants paths --from=project_a/test_helloworld/unit/greeting_test.py:tests --to=project_a/test_helloworld/unit/translator_test.py:tests
hundreds-father-404
05/03/2022, 4:50 PMwide-zoo-86070
05/03/2022, 4:51 PM./pants paths --from=project_a/test_helloworld/unit/greeting_test.py:tests --to=project_a/test_helloworld/unit/translator_test.py:tests
12:51:33.24 [ERROR] 1 Exception encountered:
ValueError: The destination is not a dependency of the source
wide-zoo-86070
05/03/2022, 4:52 PMwide-zoo-86070
05/03/2022, 4:53 PM--changed-dependees
(e.g. ./pants --changed-since=origin/master --changed-dependees=transitive test
), the translator_test.py will run.hundreds-father-404
05/03/2022, 4:56 PM./pants --changed-since=origin/master list
? That will show you what Pants thinks has changed. (To confirm it thinks only greeting_test.py
has changed)wide-zoo-86070
05/03/2022, 4:56 PM./pants --changed-since=origin/master list
project_a/test_helloworld/unit/greeting_test.py:tests
hundreds-father-404
05/03/2022, 4:57 PM./pants dependees --transitive project_a/test_helloworld/unit/greeting_test.py:tests
?wide-zoo-86070
05/03/2022, 4:58 PM./pants dependees --transitive project_a/test_helloworld/unit/greeting_test.py:tests
project_a/test_helloworld/unit:tests
hundreds-father-404
05/03/2022, 4:59 PM./pants dependencies --transitive project_a/test_helloworld/unit/translator_test.py:tests
?wide-zoo-86070
05/03/2022, 4:59 PMpython_tests(name="tests", tags=["unit_test"])
includes both of them.hundreds-father-404
05/03/2022, 4:59 PMwide-zoo-86070
05/03/2022, 5:09 PM./pants dependencies --transitive project_a/test_helloworld/unit/translator_test.py:tests
//:dev#pytest
//dev-requirements.txt:dev
project_a/helloworld/translator/translator.py
hundreds-father-404
05/03/2022, 5:11 PM./pants list
is what I expect but ./pants test
is not. Thanks for pointing that out!! I will file a bug reportwide-zoo-86070
05/03/2022, 5:12 PMhundreds-father-404
05/03/2022, 5:15 PMhundreds-father-404
05/11/2022, 2:57 AM