I understand the concept of explicitly adding unde...
# general
g
I understand the concept of explicitly adding undeclared dependencies - but on my system this doesn’t work without adding the Try/Except ImportError block: Here is what’s returned when the Try/Except block is included:
Copy code
❯ ./pants dependencies packages/example/tests/test_example.py | grep requirements
requirements:reqs#numpy
requirements:reqs#pytest
requirements:reqs#python-gdcm
And now here’s what happens when I comment it out:
Copy code
❯ ./pants dependencies packages/example/tests/test_example.py | grep requirements
requirements:reqs#numpy
requirements:reqs#pytest
Everything else is the same on the BUILD file for those two examples:
Copy code
python_tests(
    name="tests",
    sources=[
        "tests/**/test_*.py",
        "tests/test_*.py",
    ],
    dependencies=[
        ":conftest",
        ":test-resources",
        "requirements:reqs#python-gdcm",
    ],
)