Hi, when I use pants to run unit test, I used to d...
# general
f
Hi, when I use pants to run unit test, I used to do like
./pants test xxx:all_test
And there would be a
BUILD
file under
xxx
like this:
Copy code
target(
    name='all_test',
    dependencies=[
        ':aaa',
        ':bbb',
    ],
)
and then it will look into
aaa
and
bbb
recursively to find
python_tests
but in this newer version (2.10) of pants when I do the same thing, I will get this warning:
Copy code
22:51:00.65 [WARN] No applicable files or targets matched. The `test` goal works with these target types:

  * junit_test
  * python_test
  * scala_junit_test
  * scalatest_test

However, you only specified targets with these target types:

  * target
and it doesn’t run any test. What should I do to make
BUILD
files behave like they did in the past?
h
Generally you shouldn't need "aggregator targets" like this
to run all tests you can
./pants test ::
Pants v2 is much smarter...
f
but if I have two big group of tests and want to test them separately, is it possible to do that?
r
yeah I also ran into this.
f
lol I’m not alone
h
If the groups of tests aren't clearly differentiated by directory, then you can also use tags: