List dir when test fails (#33685)
This commit is contained in:
1 parent
24840b54ac
commit
5bf7e0fcc0
2 files changed
+31
-2
No files matched your search
@@ -0,0 +1,18 @@
|
||||
"""Conftest for TTS tests.
|
||||
|
||||
From http://doc.pytest.org/en/latest/example/simple.html#making-test-result-information-available-in-fixtures
|
||||
"""
|
||||
|
||||
import pytest
|
||||
|
||||
|
||||
@pytest.hookimpl(tryfirst=True, hookwrapper=True)
|
||||
def pytest_runtest_makereport(item, call):
|
||||
"""Add test report to node."""
|
||||
# execute all other hooks to obtain the report object
|
||||
outcome = yield
|
||||
rep = outcome.get_result()
|
||||
|
||||
# set a report attribute for each phase of a call, which can
|
||||
# be "setup", "call", "teardown"
|
||||
setattr(item, "rep_" + rep.when, rep)
|
||||
Reference in new issue
Block a user