Please change default tests coverage argument to --cov
or allow users to configure it
#24973
Labels
area-testing
feature-request
Request for new features or functionality
info-needed
Issue requires more information from poster
triage-needed
Needs assignment to the proper sub-team
Currently this extension will add
--cov=.
by default when tests with coverage. According to pytest-cov's docs:so this will override my coverage config file and lead to include unwanted files in my coverage report.
To solve it, this extension's docs guide users to configure
python.testing.pytestArgs
:In my opinion, this is not a good behavior. Beacause
python.testing.pytestArgs
doesn't distinguish tests and tests with coverage. Since vscode give us separate buttons for them, it's better to give separate pytest arguments too.I think
--cov
maybe a better default behavior, and just guide users to configure coverage for file discovery.A new option likes
python.testing.pytestCovArgs
is a good idea to allow more customize coverage behavior.The text was updated successfully, but these errors were encountered: