Here are the examples of the python api twisted.trial.itrial.ITestCase taken from open source projects. By voting up you can indicate which examples are most useful and appropriate.
3 Examples
3
Example 1
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))
3
Example 2
Project: mythbox Source File: test_runner.py
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))
0
Example 3
def setUp(self):
self.original = self.PyUnitTest('test_pass')
self.test = ITestCase(self.original)