def _test_module(the_module): loader = yp_unittest.TestLoader() tests = loader.loadTestsFromModule(the_module) for error in loader.errors: print(error, file=sys.stderr) if loader.errors: raise Exception("errors while loading tests") support.run_unittest(tests)
def test_main(): # Historically, these tests have been sloppy about removing TESTFN. # So get rid of it no matter what. try: run_unittest(AutoFileTests, OtherFileTests) finally: if os.path.exists(TESTFN): os.unlink(TESTFN)
def test_main(): tests = [PickleTests, PyPicklerTests, PyPersPicklerTests, PyDispatchTableTests, PyChainDispatchTableTests] if has_c_implementation: tests.extend([CPicklerTests, CPersPicklerTests, CDumpPickle_LoadPickle, DumpPickle_CLoadPickle, PyPicklerUnpicklerObjectTests, CPicklerUnpicklerObjectTests, CDispatchTableTests, CChainDispatchTableTests, InMemoryPickleTests]) support.run_unittest(*tests)
def test_main(verbose=None): support.run_unittest(ListTest) # verify reference counting import sys if verbose and hasattr(sys, "gettotalrefcount"): import gc counts = [None] * 5 for i in range(len(counts)): support.run_unittest(ListTest) gc.collect() counts[i] = sys.gettotalrefcount() print(counts)
def test_main(verbose=None): test_classes = ( TestBase, TestDecorateSortUndecorate, TestBugs, ) support.run_unittest(*test_classes) # verify reference counting if verbose and hasattr(sys, "gettotalrefcount"): import gc counts = [None] * 5 for i in range(len(counts)): support.run_unittest(*test_classes) gc.collect() counts[i] = sys.gettotalrefcount() print(counts)
def test_main(): support.run_unittest( DictTest, GeneralMappingTests, SubclassMappingTests, )
def test_main(): support.run_unittest(TestHexOctBin)
def test_main(): support.run_unittest(BoolTest)
def test_main(): test_cases = [ tc for tc in globals().values() if isinstance(tc, type) and issubclass(tc, yp_unittest.TestCase)] run_unittest(*test_cases)
def test_main(): support.run_unittest(IntTestCases)
def test_main(): support.run_unittest(FileCompareTestCase, DirCompareTestCase)
def test_main(): support.run_unittest(ModuleTest)
def test_main(): support.run_unittest(LongExpText)
def test_main(): run_unittest(TestCase)
def test_main(): support.run_unittest(TupleTest)
def test_main(): run_unittest(__name__)