Python: Run Current Unit Test File throws error if junitxml argument is used
See original GitHub issueIssue Type: Bug
- Create a simple Pytest project and add argument “–junitxml=abc.xml”
- Run command Python: Run Current Unit Test File
Observed:
============================= test session starts =============================
platform win32 -- Python 3.7.0, pytest-3.7.1, py-1.5.4, pluggy-0.7.1
rootdir: d:\Working\simple_project, inifile: pytest.ini
plugins: metadata-1.7.0, html-1.19.0
collected 1 item
tests\test_simple_mapping.py . [100%]
generated xml file: d:\Working\simple_project\abc.xml
========================== 1 passed in 0.05 seconds ===========================
Error: Error: ENOENT: no such file or directory, open 'D:\Dev_Tools\Microsoft VS Code\abc.xml'
Expected: No issue happen
Extension version: 2018.7.1 VS Code version: Code 1.26.0 (4e9361845dc28659923a300945f84731393e210d, 2018-08-13T16:29:31.933Z) OS version: Windows_NT x64 10.0.17134
Issue Analytics
- State:
- Created 5 years ago
- Comments:15 (4 by maintainers)
Top Results From Across the Web
unittest — Unit testing framework — Python 3.11.1 ...
The unittest module can be used from the command line to run tests from modules, ... If the setUp() method raises an exception...
Read more >Python, Passing --junitxml to pytest.main() - Stack Overflow
I want to use the already existing option. I want my pytest.main() call to be supplied with --junitxml argument so that the test...
Read more >Usage and Invocations — pytest documentation
This will run tests which contain names that match the given string expression (case-insensitive), which can include Python operators that use filenames, ...
Read more >Outputting XML Test Reports — nose2 0.12.0 documentation
By default, the report is written to a file called nose2-junit.xml in the current working directory. You can configure the output filename by...
Read more >Coverage.py — Coverage.py 7.0.1 documentation
Coverage.py is a tool for measuring code coverage of Python programs. It monitors your program, ... Use coverage run to run your test...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I assume this works if you run this from the command-line with the same Python environment?
[ @trinhpham I edited your ✉️ ⬆️ to come off as more 😃 and less 😠 ]