我们从Python开源项目中,提取了以下8个代码示例,用于说明如何使用test.test_genexps()。
def test_main(verbose=None): import sys from test import support from test import test_genexps support.run_doctest(test_genexps, verbose) # verify reference counting if verbose and hasattr(sys, "gettotalrefcount"): import gc counts = [None] * 5 for i in range(len(counts)): support.run_doctest(test_genexps, verbose) gc.collect() counts[i] = sys.gettotalrefcount() print(counts)
def test_main(verbose=None): import sys from test import test_support from test import test_genexps test_support.run_doctest(test_genexps, verbose) # verify reference counting if verbose and hasattr(sys, "gettotalrefcount"): import gc counts = [None] * 5 for i in xrange(len(counts)): test_support.run_doctest(test_genexps, verbose) gc.collect() counts[i] = sys.gettotalrefcount() print counts
def test_main(verbose=None): from test import support from test import test_genexps support.run_doctest(test_genexps, verbose) # verify reference counting if verbose and hasattr(sys, "gettotalrefcount"): import gc counts = [None] * 5 for i in range(len(counts)): support.run_doctest(test_genexps, verbose) gc.collect() counts[i] = sys.gettotalrefcount() print(counts)