diff options
author | Ned Batchelder <ned@nedbatchelder.com> | 2021-02-06 21:55:29 -0500 |
---|---|---|
committer | Ned Batchelder <ned@nedbatchelder.com> | 2021-02-07 17:24:44 -0500 |
commit | c0921466d3d235f10be333da1f9cf523f4e2e24c (patch) | |
tree | 5e67f7e62db1048229a54e308885b935616b6e5a /tests/test_context.py | |
parent | 465dace54a3f3300c0a86b527a8f77d0475fc895 (diff) | |
download | python-coveragepy-git-c0921466d3d235f10be333da1f9cf523f4e2e24c.tar.gz |
refactor: convert all skipping to pytest skips
Diffstat (limited to 'tests/test_context.py')
-rw-r--r-- | tests/test_context.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/tests/test_context.py b/tests/test_context.py index 20b7a290..f51befae 100644 --- a/tests/test_context.py +++ b/tests/test_context.py @@ -6,6 +6,8 @@ import inspect import os.path +import pytest + import coverage from coverage import env from coverage.context import qualname_from_frame @@ -279,9 +281,8 @@ class QualnameTest(CoverageTest): c.meth = patch_meth assert c.meth(c) == "tests.test_context.patch_meth" + @pytest.mark.skipif(not env.PY2, reason="Old-style classes are only in Python 2") def test_oldstyle(self): - if not env.PY2: - self.skipTest("Old-style classes are only in Python 2") assert OldStyle().meth() == "tests.test_context.OldStyle.meth" assert OldChild().meth() == "tests.test_context.OldStyle.meth" |