#5035 (Get test output as HTML using html-TestRunner)
by Luc Saffre · in Developers · assigned to Luc Saffre
Kurzbeschreibung
Kinder
Kommentare
- 3 Jahre, 3 Monate ago von Luc Saffre about #5035 (Get test output as HTML using html-TestRunner) : And then pytest doesn't run each doctest in a separate process (as atelier does). That's a problem for us because once a Django settings module is imported, it remains there until the end of the process.
- 3 Jahre, 3 Monate ago von Luc Saffre about #5035 (Get test output as HTML using html-TestRunner) : I guess that pytest doesn't look for a load_tests() function. But as explained [url docs.pytest.org/en/7.1.x/how-to/doctest.html here] we can just add "docs" to the directories to discover, and add options like --doctest-glob="*.rst" --ignore=docs/dev/lets/step4.rst --ignore=docs/specs/noi/mailbox.r...
- 3 Jahre, 3 Monate ago von Luc Saffre about #5035 (Get test output as HTML using html-TestRunner) : But this runs only 40 tests. We have much more cases. Seems that pytest discovers differently than unittest.
- 3 Jahre, 3 Monate ago von Luc Saffre about #5035 (Get test output as HTML using html-TestRunner) : Inspired by [url stackoverflow.com/a/53339079/407239 a post on stackoverflow] I did:
pip install pytest pytest-html pytest -v tests --html=pytest_report.html --self-contained-html
- 3 Jahre, 3 Monate ago von Luc Saffre about #5035 (Get test output as HTML using html-TestRunner) : The book test suite has 50 failures, so it would be nice to have the test results as a html page.
- 3 Jahre, 3 Monate ago von Luc Saffre about #5035 (Get test output as HTML using html-TestRunner) : Created new Ticket #5035 (Get test output as HTML using html-TestRunner).