I use pytest
for testing. My test files reside in a subdirectory tests
and they are named Foo.py
, Bar.py
instead of test_Foo.py
, TestFoo.py
, etc. So, to make sure pytest
find them, I have a pytest.ini
file in the root dir of the project with the following contents:
[pytest]
python_files=tests/*py
How to I specify the path to the pytest.ini
file in Visual Studio Code so that the vscode-python
plugin can correctly/successfully discover my test files? No matter what I try, I get Test discovery failed
, with no reasons given.