Configure unittest in vscode

1

I am not able to configure the Visual Studio Code unit testing feature. The extension goes on to say that no tests were found:

Myargumentsettingisindefaultmode,ie:

#//Argumentspassedin.Eachargumentisaseparateiteminthearray."python.unitTest.unittestArgs": [
    "-v",
    "-s",
    ".",
    "-p",
    "*test*.py"
  ],

And the structure of my project is this:

Thatis,theextensionisnotlocatingtheguardtestmoduleinsidethetestsfolder.

Followthe link of the feature description.

    
asked by anonymous 04.05.2018 / 22:58

1 answer

0

Solved!

As my tests are not in the root directory of the project, I had to inform the directory in the configuration file, so it looks like this:

    "python.unitTest.unittestArgs": [
    "-v",
    "-s",
    "tests",
    "-p",
    "*test*.py"
]
    
05.05.2018 / 13:42