diff options
author | Victor Stinner <victor.stinner@gmail.com> | 2013-11-27 20:39:49 (GMT) |
---|---|---|
committer | Victor Stinner <victor.stinner@gmail.com> | 2013-11-27 20:39:49 (GMT) |
commit | 3c0481d426d4c2953ade7371748486b8669c9d8b (patch) | |
tree | cd282fae02ca2a401c05c70b4fbffb1e004e80e1 /Lib/test/test_tracemalloc.py | |
parent | cced076218b057067294f91f07df784aff8ea774 (diff) | |
download | cpython-3c0481d426d4c2953ade7371748486b8669c9d8b.zip cpython-3c0481d426d4c2953ade7371748486b8669c9d8b.tar.gz cpython-3c0481d426d4c2953ade7371748486b8669c9d8b.tar.bz2 |
Close #19798: replace "maximum" term with "peak" in get_traced_memory()
documentation. Use also the term "current" for the current size.
Diffstat (limited to 'Lib/test/test_tracemalloc.py')
-rw-r--r-- | Lib/test/test_tracemalloc.py | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/Lib/test/test_tracemalloc.py b/Lib/test/test_tracemalloc.py index f1352e3..8419a58 100644 --- a/Lib/test/test_tracemalloc.py +++ b/Lib/test/test_tracemalloc.py @@ -182,19 +182,19 @@ class TestTracemallocEnabled(unittest.TestCase): obj_size = 1024 * 1024 tracemalloc.clear_traces() obj, obj_traceback = allocate_bytes(obj_size) - size, max_size = tracemalloc.get_traced_memory() + size, peak_size = tracemalloc.get_traced_memory() self.assertGreaterEqual(size, obj_size) - self.assertGreaterEqual(max_size, size) + self.assertGreaterEqual(peak_size, size) self.assertLessEqual(size - obj_size, max_error) - self.assertLessEqual(max_size - size, max_error) + self.assertLessEqual(peak_size - size, max_error) # destroy the object obj = None - size2, max_size2 = tracemalloc.get_traced_memory() + size2, peak_size2 = tracemalloc.get_traced_memory() self.assertLess(size2, size) self.assertGreaterEqual(size - size2, obj_size - max_error) - self.assertGreaterEqual(max_size2, max_size) + self.assertGreaterEqual(peak_size2, peak_size) # clear_traces() must reset traced memory counters tracemalloc.clear_traces() @@ -202,8 +202,8 @@ class TestTracemallocEnabled(unittest.TestCase): # allocate another object obj, obj_traceback = allocate_bytes(obj_size) - size, max_size = tracemalloc.get_traced_memory() - self.assertGreater(size, 0) + size, peak_size = tracemalloc.get_traced_memory() + self.assertGreaterEqual(size, obj_size) # stop() also resets traced memory counters tracemalloc.stop() |