diff options
author | Antoine Pitrou <solipsis@pitrou.net> | 2011-10-04 08:28:37 (GMT) |
---|---|---|
committer | Antoine Pitrou <solipsis@pitrou.net> | 2011-10-04 08:28:37 (GMT) |
commit | 1a3ff48c55fcb4dd8151750976242d83a84a09b0 (patch) | |
tree | 74f4f275edb2206b64eb2aeaf0be9406814c1b71 /Lib/test/pickletester.py | |
parent | 5a688dbf97f1537d3f2309bfe6be93dab2f10ce0 (diff) | |
parent | 94190bb6e7f3b1c7942b562fe0fad3e62b5386b9 (diff) | |
download | cpython-1a3ff48c55fcb4dd8151750976242d83a84a09b0.zip cpython-1a3ff48c55fcb4dd8151750976242d83a84a09b0.tar.gz cpython-1a3ff48c55fcb4dd8151750976242d83a84a09b0.tar.bz2 |
Start fixing test_bigmem:
- bigmemtest is replaced by precisionbigmemtest
- add a poor man's watchdog thread to print memory consumption
Diffstat (limited to 'Lib/test/pickletester.py')
-rw-r--r-- | Lib/test/pickletester.py | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/Lib/test/pickletester.py b/Lib/test/pickletester.py index ca46457..061bce9 100644 --- a/Lib/test/pickletester.py +++ b/Lib/test/pickletester.py @@ -9,7 +9,7 @@ from http.cookies import SimpleCookie from test.support import ( TestFailed, TESTFN, run_with_locale, no_tracing, - _2G, _4G, precisionbigmemtest, + _2G, _4G, bigmemtest, ) from pickle import bytes_types @@ -1188,7 +1188,7 @@ class BigmemPickleTests(unittest.TestCase): # Binary protocols can serialize longs of up to 2GB-1 - @precisionbigmemtest(size=_2G, memuse=1 + 1, dry_run=False) + @bigmemtest(size=_2G, memuse=1 + 1, dry_run=False) def test_huge_long_32b(self, size): data = 1 << (8 * size) try: @@ -1204,7 +1204,7 @@ class BigmemPickleTests(unittest.TestCase): # (older protocols don't have a dedicated opcode for bytes and are # too inefficient) - @precisionbigmemtest(size=_2G, memuse=1 + 1, dry_run=False) + @bigmemtest(size=_2G, memuse=1 + 1, dry_run=False) def test_huge_bytes_32b(self, size): data = b"abcd" * (size // 4) try: @@ -1220,7 +1220,7 @@ class BigmemPickleTests(unittest.TestCase): finally: data = None - @precisionbigmemtest(size=_4G, memuse=1 + 1, dry_run=False) + @bigmemtest(size=_4G, memuse=1 + 1, dry_run=False) def test_huge_bytes_64b(self, size): data = b"a" * size try: @@ -1235,7 +1235,7 @@ class BigmemPickleTests(unittest.TestCase): # All protocols use 1-byte per printable ASCII character; we add another # byte because the encoded form has to be copied into the internal buffer. - @precisionbigmemtest(size=_2G, memuse=2 + character_size, dry_run=False) + @bigmemtest(size=_2G, memuse=2 + character_size, dry_run=False) def test_huge_str_32b(self, size): data = "abcd" * (size // 4) try: @@ -1252,7 +1252,7 @@ class BigmemPickleTests(unittest.TestCase): # BINUNICODE (protocols 1, 2 and 3) cannot carry more than # 2**32 - 1 bytes of utf-8 encoded unicode. - @precisionbigmemtest(size=_4G, memuse=1 + character_size, dry_run=False) + @bigmemtest(size=_4G, memuse=1 + character_size, dry_run=False) def test_huge_str_64b(self, size): data = "a" * size try: |