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