From f6a1d2d04e526c599e04db136ad27975670338f1 Mon Sep 17 00:00:00 2001 From: Lukas Bednar Date: Tue, 18 Oct 2016 10:05:38 +0200 Subject: [PATCH] Fix #45 deprecated __multicall__ parameter (#52) --- pytest_jira.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) 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 ...