With pytest and vscode-python I would like to run tests which were previously implemented with the unittest framework.
Therefore, I successfully ran the tests using pytest in the respective directory tests
.
pytest
I also set up vscode-python and tested almost all tests succesfully.
However, those tests, which load data from the subdirectory tests/data
fail, because vscode-python seems to run pytest from another directory than the tests directory tests
.
abc/
|-- tests/
|-- test_function.py
|-- data/
How can I set up vscode-python, such that all data files from the already implemented tests are read successfully?