def test_should_patch_and_unpatch_unittest(self): params = dict(verbosity=3, descriptions=1) output = runTests(self.suite, **params) specwriter.patch_unittest() spec = runTests(self.suite, **params) specwriter.unpatch_unittest() restored_output = runTests(self.suite, **params) self.assertNotEquals(spec, output) self.assertEquals(output, restored_output)
def tearDown(self): specwriter.unpatch_unittest()