2

I'm using pytest and pytest-html to generate reports. Having just found out about warnings, I'd like to have the warnings that I generate in tests with

warnings.warn(UserWarning(f'Whoops!'))

be shown somewhere in the generated HTML test report. At the moment, they're just shown in the console and I can't see an obvious way to achieve this. Can anyone help?

Ed King
  • 1,833
  • 1
  • 15
  • 32
  • Did you get any solution for this? – Yogaraj Apr 29 '21 at 13:52
  • It seems is a reported [issue](https://github.com/pytest-dev/pytest/issues/2717) and happens with other type of reports. I've tried `--junitxml`, `--html-report` and `--html` and didn't work. – Chilcano Mar 01 '22 at 11:26

0 Answers0