• Home
  • Raw
  • Download

Lines Matching refs:unittest

7 import unittest
8 from unittest.case import _Outcome
10 from unittest.test.support import (LoggingResult,
15 return unittest.TestResult()
19 return unittest.TextTestRunner(resultclass=resultFactory,
24 suite = unittest.TestSuite()
26 tests = unittest.defaultTestLoader.loadTestsFromTestCase(case)
32 realSuite = unittest.TestSuite()
35 suite.addTest(unittest.TestSuite())
36 realSuite.addTest(unittest.TestSuite())
48 class TestCleanUp(unittest.TestCase):
50 class TestableTest(unittest.TestCase):
76 class TestableTest(unittest.TestCase):
106 class TestableTest(unittest.TestCase):
131 result = unittest.TestResult()
148 class TestableTest(unittest.TestCase):
171 class TestClassCleanup(unittest.TestCase):
173 class TestableTest(unittest.TestCase):
203 class TestableTest(unittest.TestCase):
228 class TestableTest(unittest.TestCase):
239 suite = unittest.defaultTestLoader.loadTestsFromTestCase(TestableTest)
245 class TestableTest(unittest.TestCase):
263 class TestableTest(unittest.TestCase):
286 class TestableTest(unittest.TestCase):
312 class TestableTest(unittest.TestCase):
359 class TestModuleCleanUp(unittest.TestCase):
370 unittest.addModuleCleanup(module_cleanup1, 1, 2, 3,
372 unittest.addModuleCleanup(module_cleanup2)
374 self.assertEqual(unittest.case._module_cleanups,
379 unittest.case.doModuleCleanups()
382 self.assertEqual(unittest.case._module_cleanups, [])
394 unittest.addModuleCleanup(module_cleanup_good, 1, 2, 3,
396 unittest.addModuleCleanup(module_cleanup_bad)
397 self.assertEqual(unittest.case._module_cleanups,
402 unittest.case.doModuleCleanups()
404 self.assertEqual(unittest.case._module_cleanups, [])
412 unittest.addModuleCleanup(cleanup, 1, 2, function='hello')
414 unittest.addModuleCleanup(function=cleanup, arg='hello')
416 unittest.addModuleCleanup()
417 unittest.case.doModuleCleanups()
428 unittest.addModuleCleanup(cleanup, ordering)
435 class TestableTest(unittest.TestCase):
458 self.assertEqual(unittest.case._module_cleanups, [])
468 unittest.addModuleCleanup(cleanup, ordering)
479 unittest.addModuleCleanup(cleanup, ordering)
486 class TestableTest(unittest.TestCase):
496 class TestableTest2(unittest.TestCase):
533 self.assertEqual(unittest.case._module_cleanups, [])
541 unittest.addModuleCleanup(cleanup, ordering)
546 class TestableTest(unittest.TestCase):
558 suite = unittest.defaultTestLoader.loadTestsFromTestCase(TestableTest)
563 self.assertEqual(unittest.case._module_cleanups, [])
570 class TestableTest(unittest.TestCase):
582 unittest.TestCase.addCleanup(cls=TestableTest(), function=cleanup)
592 class TestableTest(unittest.TestCase):
603 unittest.TestCase.addCleanup(self=TestableTest(), function=cleanup)
615 unittest.addModuleCleanup(cleanup, ordering)
620 class TestableTest(unittest.TestCase):
647 unittest.addModuleCleanup(cleanup, ordering)
652 class TestableTest(unittest.TestCase):
680 unittest.addModuleCleanup(cleanup, ordering, blowUp=True)
687 class TestableTest(unittest.TestCase):
765 unittest.addModuleCleanup(cleanup1)
770 class TestableTest(unittest.TestCase):
779 class OtherTestableTest(unittest.TestCase):
798 class Test_TextTestRunner(unittest.TestCase):
814 runner = unittest.TextTestRunner()
820 self.assertEqual(runner.resultclass, unittest.TextTestResult)
824 class AResult(unittest.TestResult):
828 class ATextResult(unittest.TextTestResult, AResult):
836 class Test(unittest.TestCase):
839 result = unittest.TestResult()
840 runner = unittest.TextTestRunner(stream=io.StringIO(), failfast=True,
850 runner = unittest.TextTestRunner(stream=io.StringIO(), tb_locals=True)
851 result = runner.run(unittest.TestSuite())
855 class Test(unittest.TestCase):
858 originalRegisterResult = unittest.runner.registerResult
860 unittest.runner.registerResult = originalRegisterResult
863 result = unittest.TestResult()
864 runner = unittest.TextTestRunner(stream=io.StringIO())
872 unittest.runner.registerResult = fakeRegisterResult
874 runner.run(unittest.TestSuite())
883 class Runner(unittest.TextTestRunner):
891 runner.run(unittest.TestSuite())
899 class LoggingRunner(unittest.TextTestRunner):
909 runner.run(unittest.TestSuite())
917 runner = unittest.TextTestRunner(stream)
930 runner = unittest.TextTestRunner(STREAM, DESCRIPTIONS, VERBOSITY,
1000 runner = unittest.TextTestRunner()
1008 runner = unittest.TextTestRunner(f)
1013 unittest.main()