I'm having trouble getting the VS Code PyTest code runner to work the way I'd like. It seems pytest options may be an all-or-nothing situation.
Is there any way to run different sets of PyTest options easily in the VS Code interface?
For example:
By default, run all tests not marked with @pytest.mark.slow
.
-m "not slow"
collected 1 item... 1 item deselected
.Run sometimes with coverage enabled, and sometimes without.
The only way I can see to do this is to run PyTest from the command line, which then loses the benefit of auto-discovery, running/debugging individual tests from the in-line interface, etc.
What am I missing?
Note: Currently using VS Code 1.45.1, Python 3.7.6, and PyTest 5.3.5
You're not missing anything. There currently isn't a way to provide per-execution arguments to get the integration you want with the Test Explorer.