diff --git a/pytest_jira.py b/pytest_jira.py index 594d58c..4e0e919 100644 --- a/pytest_jira.py +++ b/pytest_jira.py @@ -53,13 +53,14 @@ def is_issue_resolved(self, issue_id): else: return not self.is_affected(issue_id) - @pytest.mark.tryfirst - def pytest_runtest_makereport(self, item, call, __multicall__): + @pytest.hookimpl(hookwrapper=True) + def pytest_runtest_makereport(self, item, call): ''' Figure out how to mark JIRA test other than SKIPPED ''' - rep = __multicall__.execute() + outcome = yield + rep = outcome.get_result() try: jira_ids = self.mark.get_jira_issues(item) except Exception: @@ -75,8 +76,6 @@ def pytest_runtest_makereport(self, item, call, __multicall__): rep.wasxfail = "failed" break - return rep - def pytest_runtest_setup(self, item): """ Skip test if ...