Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 3 additions & 8 deletions allure-pytest/src/listener.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,19 +83,14 @@ def pytest_runtest_setup(self, item):
test_result.historyId = md5(test_result.fullName)
test_result.parameters.extend(
[Parameter(name=name, value=represent(value)) for name, value in params.items()])
test_result.start = now()

@pytest.hookimpl(hookwrapper=True)
def pytest_runtest_call(self, item):
def pytest_runtest_teardown(self, item):
uuid = self._cache.get(item.nodeid)
test_result = self.allure_logger.get_test(uuid)
if test_result:
test_result.start = now()
yield
if test_result:
test_result.stop = now()
test_result.stop = now()

@pytest.hookimpl(hookwrapper=True)
def pytest_runtest_teardown(self, item):
yield
uuid = self._cache.get(item.nodeid)
test_result = self.allure_logger.get_test(uuid)
Expand Down