From c0921466d3d235f10be333da1f9cf523f4e2e24c Mon Sep 17 00:00:00 2001 From: Ned Batchelder Date: Sat, 6 Feb 2021 21:55:29 -0500 Subject: refactor: convert all skipping to pytest skips --- tests/test_plugins.py | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) (limited to 'tests/test_plugins.py') 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.""" -- cgit v1.2.1