/usr/lib/python3/dist-packages/twisted/trial/test
NameSizeModeActions
__pycache__/-0755rm
detests.py56670644editdlrm
erroneous.py47920644editdlrm
mockcustomsuite.py5360644editdlrm
mockcustomsuite2.py5330644editdlrm
mockcustomsuite3.py6760644editdlrm
mockdoctest.py24210644editdlrm
moduleself.py1700644editdlrm
moduletest.py3020644editdlrm
novars.py1820644editdlrm
ordertests.py8640644editdlrm
packages.py46510644editdlrm
sample.py20840644editdlrm
scripttest.py4570755editdlrm
skipping.py57090644editdlrm
suppression.py24990644editdlrm
test_assertions.py608130644editdlrm
test_asyncassertions.py25520644editdlrm
test_deferred.py88220644editdlrm
test_doctest.py17130644editdlrm
test_keyboard.py37840644editdlrm
test_loader.py223600644editdlrm
test_log.py80400644editdlrm
test_output.py50160644editdlrm
test_plugins.py14600644editdlrm
test_pyunitcompat.py76200644editdlrm
test_reporter.py567090644editdlrm
test_runner.py350400644editdlrm
test_script.py293770644editdlrm
test_skip.py26510644editdlrm
test_suppression.py59110644editdlrm
test_testcase.py19850644editdlrm
test_tests.py495000644editdlrm
test_util.py196600644editdlrm
test_warning.py176380644editdlrm
weird.py6750644editdlrm
__init__.py1300644editdlrm
Edit: /usr/lib/python3/dist-packages/twisted/trial/test/test_doctest.py (1713B)
# Copyright (c) Twisted Matrix Laboratories. # See LICENSE for details. """ Test Twisted's doctest support. """ from twisted.trial import itrial, reporter, runner, unittest from twisted.trial.test import mockdoctest class RunnersTests(unittest.SynchronousTestCase): """ Tests for Twisted's doctest support. """ def test_id(self): """ Check that the id() of the doctests' case object contains the FQPN of the actual tests. """ loader = runner.TestLoader() suite = loader.loadDoctests(mockdoctest) idPrefix = "twisted.trial.test.mockdoctest.Counter" for test in suite._tests: self.assertIn(idPrefix, itrial.ITestCase(test).id()) def test_basicTrialIntegration(self): """ L{loadDoctests} loads all of the doctests in the given module. """ loader = runner.TestLoader() suite = loader.loadDoctests(mockdoctest) self.assertEqual(7, suite.countTestCases()) def _testRun(self, suite): """ Run C{suite} and check the result. """ result = reporter.TestResult() suite.run(result) self.assertEqual(5, result.successes) self.assertEqual(2, len(result.failures)) def test_expectedResults(self, count=1): """ Trial can correctly run doctests with its xUnit test APIs. """ suite = runner.TestLoader().loadDoctests(mockdoctest) self._testRun(suite) def test_repeatable(self): """ Doctests should be runnable repeatably. """ suite = runner.TestLoader().loadDoctests(mockdoctest) self._testRun(suite) self._testRun(suite)