Python test.test_bisect() Examples

The following are 7 code examples of test.test_bisect(). You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may also want to check out all available functions/classes of the module test , or try the search function .
Example #1
Source File: test_bisect.py    From ironpython2 with Apache License 2.0 6 votes vote down vote up
def test_main(verbose=None):
    from test import test_bisect

    test_classes = [TestBisectPython, TestBisectC,
                    TestInsortPython, TestInsortC,
                    TestErrorHandlingPython, TestErrorHandlingC]

    test_support.run_unittest(*test_classes)
    test_support.run_doctest(test_bisect, verbose)

    # verify reference counting
    if verbose and hasattr(sys, "gettotalrefcount"):
        import gc
        counts = [None] * 5
        for i in xrange(len(counts)):
            test_support.run_unittest(*test_classes)
            gc.collect()
            counts[i] = sys.gettotalrefcount()
        print counts 
Example #2
Source File: test_bisect.py    From BinderFilter with MIT License 6 votes vote down vote up
def test_main(verbose=None):
    from test import test_bisect

    test_classes = [TestBisectPython, TestBisectC,
                    TestInsortPython, TestInsortC,
                    TestErrorHandlingPython, TestErrorHandlingC]

    test_support.run_unittest(*test_classes)
    test_support.run_doctest(test_bisect, verbose)

    # verify reference counting
    if verbose and hasattr(sys, "gettotalrefcount"):
        import gc
        counts = [None] * 5
        for i in xrange(len(counts)):
            test_support.run_unittest(*test_classes)
            gc.collect()
            counts[i] = sys.gettotalrefcount()
        print counts 
Example #3
Source File: test_bisect.py    From oss-ftp with MIT License 6 votes vote down vote up
def test_main(verbose=None):
    from test import test_bisect

    test_classes = [TestBisectPython, TestBisectC,
                    TestInsortPython, TestInsortC,
                    TestErrorHandlingPython, TestErrorHandlingC]

    test_support.run_unittest(*test_classes)
    test_support.run_doctest(test_bisect, verbose)

    # verify reference counting
    if verbose and hasattr(sys, "gettotalrefcount"):
        import gc
        counts = [None] * 5
        for i in xrange(len(counts)):
            test_support.run_unittest(*test_classes)
            gc.collect()
            counts[i] = sys.gettotalrefcount()
        print counts 
Example #4
Source File: test_bisect.py    From gcblue with BSD 3-Clause "New" or "Revised" License 6 votes vote down vote up
def test_main(verbose=None):
    from test import test_bisect

    test_classes = [TestBisectPython, TestBisectC,
                    TestInsortPython, TestInsortC,
                    TestErrorHandlingPython, TestErrorHandlingC]

    test_support.run_unittest(*test_classes)
    test_support.run_doctest(test_bisect, verbose)

    # verify reference counting
    if verbose and hasattr(sys, "gettotalrefcount"):
        import gc
        counts = [None] * 5
        for i in xrange(len(counts)):
            test_support.run_unittest(*test_classes)
            gc.collect()
            counts[i] = sys.gettotalrefcount()
        print counts 
Example #5
Source File: test_bisect.py    From medicare-demo with Apache License 2.0 6 votes vote down vote up
def test_main(verbose=None):
    from test import test_bisect
    from types import BuiltinFunctionType
    import sys

    test_classes = [TestBisect, TestInsort]
    if isinstance(bisect_left, BuiltinFunctionType):
        test_classes.append(TestErrorHandling)

    test_support.run_unittest(*test_classes)
    test_support.run_doctest(test_bisect, verbose)

    # verify reference counting
    if verbose and hasattr(sys, "gettotalrefcount"):
        import gc
        counts = [None] * 5
        for i in xrange(len(counts)):
            test_support.run_unittest(*test_classes)
            gc.collect()
            counts[i] = sys.gettotalrefcount()
        print counts 
Example #6
Source File: test_bisect.py    From CTFCrackTools-V2 with GNU General Public License v3.0 6 votes vote down vote up
def test_main(verbose=None):
    from test import test_bisect

    test_classes = [TestBisectPython, TestBisectC,
                    TestInsortPython, TestInsortC,
                    TestErrorHandlingPython, TestErrorHandlingC]

    test_support.run_unittest(*test_classes)
    test_support.run_doctest(test_bisect, verbose)

    # verify reference counting
    if verbose and hasattr(sys, "gettotalrefcount"):
        import gc
        counts = [None] * 5
        for i in xrange(len(counts)):
            test_support.run_unittest(*test_classes)
            gc.collect()
            counts[i] = sys.gettotalrefcount()
        print counts 
Example #7
Source File: test_bisect.py    From CTFCrackTools with GNU General Public License v3.0 6 votes vote down vote up
def test_main(verbose=None):
    from test import test_bisect

    test_classes = [TestBisectPython, TestBisectC,
                    TestInsortPython, TestInsortC,
                    TestErrorHandlingPython, TestErrorHandlingC]

    test_support.run_unittest(*test_classes)
    test_support.run_doctest(test_bisect, verbose)

    # verify reference counting
    if verbose and hasattr(sys, "gettotalrefcount"):
        import gc
        counts = [None] * 5
        for i in xrange(len(counts)):
            test_support.run_unittest(*test_classes)
            gc.collect()
            counts[i] = sys.gettotalrefcount()
        print counts