Skip to content

Commit

Permalink
Log the test outcome
Browse files Browse the repository at this point in the history
  • Loading branch information
s0undt3ch committed Apr 16, 2021
1 parent 192e15a commit 9731932
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .pylint-spelling-words
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,7 @@ ret
returncode
rst
rtype
runtest
saltapi
saltcloud
saltenv
Expand Down Expand Up @@ -151,6 +152,7 @@ sysinfo
sysstats
systemd
systemdsaltdaemonimpl
teardown
tempfile
tempfiles
testname
Expand Down
1 change: 1 addition & 0 deletions changelog/52.improvement.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Log the test outcome
10 changes: 10 additions & 0 deletions src/saltfactories/plugins/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,16 @@ def pytest_runtest_logfinish(nodeid):
log.debug("<<<<<<< END %s <<<<<<<", nodeid)


def pytest_runtest_logreport(report):
"""
Process the :py:class:`_pytest.reports.TestReport` produced for each
of the setup, call and teardown runtest phases of an item.
See :func:`pytest_runtest_protocol` for a description of the runtest protocol.
"""
if report.when == "call":
log.debug("======= %s %s ========", report.outcome.upper(), report.nodeid)


@pytest.hookimpl(trylast=True)
def pytest_load_initial_conftests(*_):
"""
Expand Down

0 comments on commit 9731932

Please sign in to comment.