summaryrefslogtreecommitdiff
path: root/tests/test_plugins.py
diff options
context:
space:
mode:
authorNed Batchelder <ned@nedbatchelder.com>2021-02-06 21:55:29 -0500
committerNed Batchelder <ned@nedbatchelder.com>2021-02-07 17:24:44 -0500
commitc0921466d3d235f10be333da1f9cf523f4e2e24c (patch)
tree5e67f7e62db1048229a54e308885b935616b6e5a /tests/test_plugins.py
parent465dace54a3f3300c0a86b527a8f77d0475fc895 (diff)
downloadpython-coveragepy-git-c0921466d3d235f10be333da1f9cf523f4e2e24c.tar.gz
refactor: convert all skipping to pytest skips
Diffstat (limited to 'tests/test_plugins.py')
-rw-r--r--tests/test_plugins.py10
1 files changed, 2 insertions, 8 deletions
diff --git a/tests/test_plugins.py b/tests/test_plugins.py
index f53de4fb..aeffdb80 100644
--- a/tests/test_plugins.py
+++ b/tests/test_plugins.py
@@ -256,12 +256,10 @@ class PluginTest(CoverageTest):
assert out == ""
+@pytest.mark.skipif(env.C_TRACER, reason="This test is only about PyTracer.")
class PluginWarningOnPyTracer(CoverageTest):
"""Test that we get a controlled exception with plugins on PyTracer."""
def test_exception_if_plugins_on_pytracer(self):
- if env.C_TRACER:
- self.skipTest("This test is only about PyTracer.")
-
self.make_file("simple.py", "a = 1")
cov = coverage.Coverage()
@@ -274,14 +272,10 @@ class PluginWarningOnPyTracer(CoverageTest):
self.start_import_stop(cov, "simple")
+@pytest.mark.skipif(not env.C_TRACER, reason="Plugins are only supported with the C tracer.")
class FileTracerTest(CoverageTest):
"""Tests of plugins that implement file_tracer."""
- def setUp(self):
- if not env.C_TRACER:
- self.skipTest("Plugins are only supported with the C tracer.")
- super(FileTracerTest, self).setUp()
-
class GoodFileTracerTest(FileTracerTest):
"""Tests of file tracer plugin happy paths."""