David
David

Reputation: 3056

ignore directory in pytest in vscode

I want to ignore a directory in pytest, but my test discovery fails in vscode:

{
"python.testing.pytestArgs": [
    "--ignore backup",
    "."
],

In vscode this is interpreted to:
python /home/dave/.vscode/extensions/ms-python.python-2020.5.86806/pythonFiles/testing_tools/run_adapter.py discover pytest -- --rootdir /home/dave/PythonProjects/mypgram -s 

I am missing the --ignore backup. Why is it not there or this the wrong place for configuration?

Upvotes: 5

Views: 5282

Answers (1)

David
David

Reputation: 3056

I found the solution by looking up the pytest syntax:
just use--ignore=backup and it will work

Upvotes: 10

Related Questions