diff options
author | Raymond Hettinger <python@rcn.com> | 2003-05-02 22:44:59 (GMT) |
---|---|---|
committer | Raymond Hettinger <python@rcn.com> | 2003-05-02 22:44:59 (GMT) |
commit | 320a1b04543a8fa7c32227f4db18238ad84ce2ae (patch) | |
tree | 41b94c7fa1fbc7a0fd416076bd3dad66256fde83 | |
parent | 8fd3f871f3ab172d4b6e49bb303e3554de268ae2 (diff) | |
download | cpython-320a1b04543a8fa7c32227f4db18238ad84ce2ae.zip cpython-320a1b04543a8fa7c32227f4db18238ad84ce2ae.tar.gz cpython-320a1b04543a8fa7c32227f4db18238ad84ce2ae.tar.bz2 |
Simplify ref count test.
-rw-r--r-- | Lib/test/test_random.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Lib/test/test_random.py b/Lib/test/test_random.py index 50bf00b..8929094 100644 --- a/Lib/test/test_random.py +++ b/Lib/test/test_random.py @@ -283,10 +283,10 @@ def test_main(verbose=None): # verify reference counting import sys if verbose and hasattr(sys, "gettotalrefcount"): - counts = [] - for i in xrange(5): + counts = [None] * 5 + for i in xrange(len(counts)): test_support.run_suite(suite) - counts.append(sys.gettotalrefcount()-i) + counts[i] = sys.gettotalrefcount() print counts if __name__ == "__main__": |