def __init__(self, testModule): warnings.warn("DocTestSuite is deprecated in Twisted 8.0.", category=DeprecationWarning, stacklevel=2) TestSuite.__init__(self) suite = doctest.DocTestSuite(testModule) for test in suite._tests: #yay encapsulation self.addTest(ITestCase(test))
def test_holderImplementsITestCase(self): """ L{runner.TestHolder} implements L{ITestCase}. """ self.assertIdentical(self.holder, ITestCase(self.holder)) self.assertTrue( verifyObject(ITestCase, self.holder), "%r claims to provide %r but does not do so correctly." % (self.holder, ITestCase))
def test_holderImplementsITestCase(self): """ L{runner.TestHolder} implements L{ITestCase}. """ self.assertIdentical(self.holder, ITestCase(self.holder))
def setUp(self): self.original = self.PyUnitTest('test_pass') self.test = ITestCase(self.original)