Hi! I'm having issues for testing (running `pants ...
# general
b
Hi! I'm having issues for testing (running
pants test
). When I run pants test , the files in the folder I'm adding the tests are being imported automatically even if my test file is empty. Is this common behavior? Is there a way to tweak it? My BUILD file in the folder:
Copy code
python_tests(name="tests")
__defaults__({"python_tests": {"sources": ["**/test_*.py"]}})
1
c
what do you mean with imported and empty here? what error do you see? or if no error, what did you expect to get compared to what you got?
b
nevermind the issue was due to pytest importing all files https://docs.pytest.org/en/7.1.x/explanation/pythonpath.html using --import-mode=importlib solves for me.
👍 1