我们从Python开源项目中,提取了以下5个代码示例,用于说明如何使用test.test_bisect()。
def test_main(verbose=None): from test import test_bisect test_classes = [TestBisectPython, TestBisectC, TestInsortPython, TestInsortC, TestErrorHandlingPython, TestErrorHandlingC] support.run_unittest(*test_classes) support.run_doctest(test_bisect, verbose) # 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(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