Is there a good way to group a whole bunch of targ...
# general
e
Is there a good way to group a whole bunch of targets together into one? (for use in dependencies, because I can't use
dependencies=["src/test/integration::"]
My integration tests are all defined per directory using
python_tests()
but I'd also like to build a pex that contains a pytest run script and "all tests" just for the sake of being able to copy this into a docker container and run it (I can run the tests locally normally, but want to be able to use them as a means of verifying that all the networking stuff between containers is rigged up properly, ie. run the tests inside the container/compose environment). I'm having a hard time getting all the tests to actually be a part of the pex. Dependency inference doesn't pick them up (since they are typically found on the filesystem by pytest's discovery methods).
c
I think the
target
target is what you want, you can add all your targets to the
dependencies
field and then reference that target. link to doc
e
I'd still have to "step by step" the targets up the directory chain because I can't do something like
target(dependencies=["./**/*")
, though, right?
c
yeah, unfortunately the wildcard (
::
in pants) isn't supported for dependencies. you can list all
python_test
targets with
pants list --filter-target-type=python_test