From 771aef9ddbd7927e30656aedc20aee5ca9fd8b8d Mon Sep 17 00:00:00 2001 From: Michael Aquilina Date: Mon, 21 Sep 2015 15:47:11 +0100 Subject: [PATCH] Add a test_skip_class test --- testing/test_skipping.py | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/testing/test_skipping.py b/testing/test_skipping.py index 2d12af427..22e5d7302 100644 --- a/testing/test_skipping.py +++ b/testing/test_skipping.py @@ -383,6 +383,22 @@ class TestXFailwithSetupTeardown: class TestSkip(object): + def test_skip_class(self, testdir): + testdir.makepyfile(""" + import pytest + @pytest.mark.skip + class TestSomething(object): + def test_foo(self): + pass + def test_bar(self): + pass + + def test_baz(): + pass + """) + rec = testdir.inline_run() + rec.assertoutcome(skipped=2, passed=1) + def test_skip_no_reason(self, testdir): testdir.makepyfile(""" import pytest