rhythmic-morning-87313
04/29/2022, 2:22 PM./pants test tests/common:tests
, pytest gets executed but all tests immediately fails with import errors because there is no 3rd-party dependencies installed. tests/common/BUILD
simply consists of python_tests(name="tests")
and its siblings include conftest.py
and test_xxx.py
stuffs. How do I let pants install 3rd party dependencies for tests?requirements.txt
and BUILD
with python_requirements(name="reqs", source="requirements.txt")
which are referenced as //:reqs
in the dependencies of src/ai/backend/common:lib
which is also referenced by tests/common:tests
.ai.backend.common.redis
and tests/common/redis/
...__init__.py
to the tests directory, but it seems that this might not be recognized..refined-addition-53644
04/29/2022, 2:44 PM3rdparty
folder at the root of your repo. Check pants own repository. This is a "standard" location known to pants. You wouldn't need to mention requirements.txt
everywhere this way
https://github.com/pantsbuild/pants/tree/main/3rdparty/python