From 29310f4bb634a8fccb5ff0453ae6686bbebcca17 Mon Sep 17 00:00:00 2001 From: Ned Batchelder Date: Thu, 11 Mar 2021 05:40:55 -0500 Subject: refactor: no need for our own xfail wrapper --- tests/coveragetest.py | 5 ----- tests/test_parser.py | 7 +++---- 2 files changed, 3 insertions(+), 9 deletions(-) (limited to 'tests') diff --git a/tests/coveragetest.py b/tests/coveragetest.py index 8427f4ad..c52892b5 100644 --- a/tests/coveragetest.py +++ b/tests/coveragetest.py @@ -478,8 +478,3 @@ def command_line(args): script = CoverageScript() ret = script.command_line(shlex.split(args)) return ret - - -def xfail(condition, reason): - """A decorator to mark a test as expected to fail.""" - return pytest.mark.xfail(condition, reason=reason, strict=True) diff --git a/tests/test_parser.py b/tests/test_parser.py index 6edb6d1a..f49c9900 100644 --- a/tests/test_parser.py +++ b/tests/test_parser.py @@ -11,7 +11,7 @@ from coverage import env from coverage.misc import NotPython from coverage.parser import PythonParser -from tests.coveragetest import CoverageTest, xfail +from tests.coveragetest import CoverageTest from tests.helpers import arcz_to_arcs @@ -139,10 +139,9 @@ class PythonParserTest(CoverageTest): ''' """) - - @xfail( + @pytest.mark.xfail( env.PYPY3 and env.PYPYVERSION == (7, 3, 0), - "https://bitbucket.org/pypy/pypy/issues/3139", + reason="https://bitbucket.org/pypy/pypy/issues/3139", ) def test_decorator_pragmas(self): parser = self.parse_source("""\ -- cgit v1.2.1