Add a test_skip_class test

This commit is contained in:
Michael Aquilina 2015-09-21 15:47:11 +01:00
parent dc7153e33c
commit 771aef9ddb
1 changed files with 16 additions and 0 deletions

View File

@ -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