Closed DonJayamanne closed 5 years ago
@ericsnowcurrently
Please note, the arguments to pytest
will be passed into the python code by node.js
(i.e. the extension
),
I.e. if using code as follows pytest.main(["-v", "tests", "--collect-only"], ....)
please note, the args will be passed in sys.argv in some form, and the python code is not to construct these arguments.
Documenting details to avoid confusions.
I've opened https://github.com/pytest-dev/pytest/issues/4850 to find out the recommended way to do just discovery using the API.
@ericsnowcurrently They provide the API for this, here's the sample code https://github.com/Microsoft/vscode-python/issues/3911#issuecomment-452364856
I've tried this, with the command line args we have today. We do not need to parse the command line arguments, just use what the extension provides and it will work, after all, that's what pytest.main
expects, just args.
Later we can look at optionally refactoring the parsing of arguments (probably in python or even better, ..) I.e. using existing args, will work (as its already parsed accordingly).
There was already example code: https://github.com/Microsoft/vscode-python/issues/3911#issuecomment-452364856
I'm still having an issue getting pytest discovered from my Miniconda installation.
Any progress on this? This #3936 is still not working.
(related to #3911)
Proposed Minimal Output Format
current pytest output:
serialized: