twisted.trial.itrial.ITestCase

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 7

Example 1

Project: mythbox Source File: runner.py
Function: init
    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))

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))

Example 3

Project: mythbox Source File: test_pyunitcompat.py
Function: set_up
    def setUp(self):
        self.original = self.PyUnitTest('test_pass')
        self.test = ITestCase(self.original)