Describe the Bug
The --xml-report option fails when the output report includes folders. It reports
ERROR: --xml-report must be a filename, not a path
for:
pytest --generate-xml --xml-report report_output/final_report.xml
While
pytest --generate-xml --xml-report final_report.xml
works fine.
Note: the documentation page is also incorrect -- it passes True to --generate-xml argument (which it can't handle) and then includes an example with a folder which fails. (link: https://github.com/reporterplus/pytest-html-plus/blob/main/docs/cli/generate-xml.rst)
To Reproduce
See description -- just run with a path in the filename for --xml-report
Command used:
See above
What actually happened:
ERROR: --xml-report must be a filename, not a path
Expected Behavior
It would allow me to specify an xml output inside a subfolder for better organization.
Environment
|
|
pytest-html-plus version |
1.1.0 |
pytest version |
9.0.3 |
| Python version |
3.12 |
| OS |
Windows 11 or Linux (CI/CD) |
Describe the Bug
The --xml-report option fails when the output report includes folders. It reports
ERROR: --xml-report must be a filename, not a pathfor:
pytest --generate-xml --xml-report report_output/final_report.xmlWhile
pytest --generate-xml --xml-report final_report.xmlworks fine.
Note: the documentation page is also incorrect -- it passes True to --generate-xml argument (which it can't handle) and then includes an example with a folder which fails. (link: https://github.com/reporterplus/pytest-html-plus/blob/main/docs/cli/generate-xml.rst)
To Reproduce
See description -- just run with a path in the filename for --xml-report
Command used:
See above
What actually happened:
ERROR: --xml-report must be a filename, not a pathExpected Behavior
It would allow me to specify an xml output inside a subfolder for better organization.
Environment
pytest-html-plusversionpytestversion