Exemple #1
0
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)
Exemple #2
0
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)
Exemple #3
0
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)
Exemple #4
0
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)
Exemple #5
0
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)
Exemple #6
0
def test_main():
    support.run_unittest(
        DictTest,
        GeneralMappingTests,
        SubclassMappingTests,
    )
Exemple #7
0
def test_main():
    support.run_unittest(TestHexOctBin)
Exemple #8
0
def test_main():
    support.run_unittest(BoolTest)
Exemple #9
0
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)
Exemple #10
0
def test_main():
    support.run_unittest(IntTestCases)
Exemple #11
0
def test_main():
    support.run_unittest(FileCompareTestCase, DirCompareTestCase)
Exemple #12
0
def test_main():
    support.run_unittest(ModuleTest)
Exemple #13
0
def test_main():
    support.run_unittest(LongExpText)
Exemple #14
0
def test_main():
    run_unittest(TestCase)
Exemple #15
0
def test_main():
    support.run_unittest(TupleTest)
Exemple #16
0
def test_main():
    run_unittest(__name__)