3 from nose.config import Config
4 from nose.plugins import debug
5 from nose.plugins.manager import PluginManager
6 from nose.plugins.skip import Skip, SkipTest
7 from nose.proxy import ResultProxyFactory
12 def post_mortem(self, tb):
15 class TestSkipPdbInteraction(unittest.TestCase):
16 """Tests interaction between skip plugin and pdb plugin -- pdb should
17 not fire on a skip error
26 def test_skip_prevents_pdb_call(self):
28 class TC(unittest.TestCase):
30 raise SkipTest('not me')
36 p.enabled_for_errors = True
37 res = unittest.TestResult()
38 conf = Config(plugins=PluginManager(plugins=[skip, p]))
39 rpf = ResultProxyFactory(conf)
40 test = case.Test(TC('test'), resultProxy=rpf)
43 assert not res.errors, "Skip was recorded as error %s" % res.errors
44 assert not debug.pdb.called, "pdb was called"
48 if __name__ == '__main__':