Allow to skip unittests if --pdb active

closes #2137
This commit is contained in:
mbyt
2017-01-30 21:20:12 +01:00
parent 0931fe2c89
commit d1c725078a
3 changed files with 32 additions and 3 deletions

View File

@@ -106,6 +106,20 @@ class TestPDB:
assert 'debug.me' in rest
self.flush(child)
def test_pdb_unittest_skip(self, testdir):
p1 = testdir.makepyfile("""
import unittest
@unittest.skipIf(True, 'Skipping also with pdb active')
class MyTestCase(unittest.TestCase):
def test_one(self):
assert 0
""")
child = testdir.spawn_pytest("-rs --pdb %s" % p1)
child.expect('Skipping also with pdb active')
child.expect('1 skipped in')
child.sendeof()
self.flush(child)
def test_pdb_interaction_capture(self, testdir):
p1 = testdir.makepyfile("""
def test_1():