Closed mlondono74 closed 1 year ago
This was user error on my part. Maybe looking at the issue will help others with a similar question. The correct way is with each arg value as a separate passed-in string. as shown below:
@app.get("/test/all")
async def runall_json():
plugin = JSONReport()
retcode = pytest.main([
"--json-report-file=report.json",
"--json-report-omit",
"keywords",
"collectors",
"test_trial.py"
], plugins=[plugin])
return plugin.report
Hello, thanks for the wonderful plugin...
from the cmd line this works as expected
pytest test_trial.py --json-report --json-report-file=report.json --json-report-omit collectors keywords
doing the same with direct invokation works as expected
but if I try to add more fields to omit, they ALL get ignored, for example
I have also tried various alternatives
etc
What I am missing / doing wrong?
Thanks again