summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_list.py
diff options
context:
space:
mode:
authorRaymond Hettinger <python@rcn.com>2004-09-29 08:03:17 (GMT)
committerRaymond Hettinger <python@rcn.com>2004-09-29 08:03:17 (GMT)
commitbcab2b25f9bf4024ed10319cf65394d44aa9b023 (patch)
tree9d66296b7238aa85c7409a19d837cd95cc582107 /Lib/test/test_list.py
parent5497feefacb19549032241bc13a29294bd772990 (diff)
downloadcpython-bcab2b25f9bf4024ed10319cf65394d44aa9b023.zip
cpython-bcab2b25f9bf4024ed10319cf65394d44aa9b023.tar.gz
cpython-bcab2b25f9bf4024ed10319cf65394d44aa9b023.tar.bz2
Improve test coverage.
Diffstat (limited to 'Lib/test/test_list.py')
-rw-r--r--Lib/test/test_list.py18
1 files changed, 15 insertions, 3 deletions
diff --git a/Lib/test/test_list.py b/Lib/test/test_list.py
index ba2f901..711ac4b 100644
--- a/Lib/test/test_list.py
+++ b/Lib/test/test_list.py
@@ -18,8 +18,20 @@ class ListTest(list_tests.CommonTest):
self.assertEqual(len([0]), 1)
self.assertEqual(len([0, 1, 2]), 3)
-def test_main():
+def test_main(verbose=None):
test_support.run_unittest(ListTest)
-if __name__=="__main__":
- test_main()
+ # verify reference counting
+ import sys
+ if verbose and hasattr(sys, "gettotalrefcount"):
+ import gc
+ counts = [None] * 5
+ for i in xrange(len(counts)):
+ test_support.run_unittest(ListTest)
+ gc.collect()
+ counts[i] = sys.gettotalrefcount()
+ print counts
+
+
+if __name__ == "__main__":
+ test_main(verbose=True)