full-toothbrush-75676
09/16/2021, 12:25 AMpytest
naming conventions? I’ve tried adding a pytest.ini
overriding the global test file naming convention to *_test.py
but pants is still picking up a file named test_case.py
. I may be missing something obvious 🤔hundreds-father-404
09/16/2021, 12:29 AMsources
field for the python_tests
target in that directory to something like ["*_test.py"]
It sounds like test_case.py
is a util file, not a test file? If so, then you want to include it in the python_library
target for that directory, so update its sources
field to be ["*.py", "!*_test.py"]
, meaning all Python files but the test files
python_library(sources=["*.py", "!*_test.py"])
python_tests(name="tests", sources=["*_test.py"])
full-toothbrush-75676
09/16/2021, 12:31 AMtest_case.py
is a util file, used in tests, yes! Ahh I see, got it – that makes sense! I’ll give that a try. Thanks!hundreds-father-404
09/16/2021, 12:42 AM