cpython: fff1455e1147 (original) (raw)

Mercurial > cpython

changeset 88389:fff1455e1147

Issue #19886: Use better estimated memory requirements for bigmem tests. Incorrect requirements can cause memory swapping. [#19886]

Serhiy Storchaka storchaka@gmail.com
date Fri, 10 Jan 2014 13:39:27 +0200
parents 5a8301002f5a(current diff)2ca26065fb00(diff)
children 93bf227664d6
files Lib/test/pickletester.py Lib/test/test_bz2.py Lib/test/test_hashlib.py Lib/test/test_marshal.py Lib/test/test_xml_etree_c.py Misc/NEWS
diffstat 6 files changed, 27 insertions(+), 35 deletions(-)[+] [-] Lib/test/pickletester.py 12 Lib/test/test_bz2.py 2 Lib/test/test_hashlib.py 29 Lib/test/test_marshal.py 10 Lib/test/test_xml_etree_c.py 4 Misc/NEWS 5

line wrap: on

line diff

--- a/Lib/test/pickletester.py +++ b/Lib/test/pickletester.py @@ -21,8 +21,6 @@ from pickle import bytes_types

kind of outer loop.

protocols = range(pickle.HIGHEST_PROTOCOL + 1) -ascii_char_size = 1 -

Return True if opcode code appears in the pickle, else False.

def opcode_in_pickle(code, pickle): @@ -1643,7 +1641,7 @@ class BigmemPickleTests(unittest.TestCas # Binary protocols can serialize longs of up to 2GB-1

@@ -1660,7 +1658,7 @@ class BigmemPickleTests(unittest.TestCas # (older protocols don't have a dedicated opcode for bytes and are # too inefficient)

@@ -1681,7 +1679,7 @@ class BigmemPickleTests(unittest.TestCas finally: data = None

@@ -1711,7 +1709,7 @@ class BigmemPickleTests(unittest.TestCas # 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.

@@ -1738,7 +1736,7 @@ class BigmemPickleTests(unittest.TestCas # of utf-8 encoded unicode. BINUNICODE8 (protocol 4) supports these huge # unicode strings however.

--- a/Lib/test/test_bz2.py +++ b/Lib/test/test_bz2.py @@ -686,7 +686,7 @@ class BZ2DecompressorTest(BaseTest): self.assertRaises(EOFError, bz2d.decompress, b"anything") self.assertRaises(EOFError, bz2d.decompress, b"")

--- a/Lib/test/test_hashlib.py +++ b/Lib/test/test_hashlib.py @@ -256,21 +256,15 @@ class HashLibTestCase(unittest.TestCase) b'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789', 'd174ab98d277d9f5a5611c2c9f419d9f')

# use the three examples from Federal Information Processing Standards # Publication 180-1, Secure Hash Standard, 1995 April 17 @@ -379,14 +373,11 @@ class HashLibTestCase(unittest.TestCase) "e718483d0ce769644e2e42c7bc15b4638e1f98b13b2044285632a803afa973eb"+ "de0ff244877ea60a4cb0432ce577c31beb009c5c2c49aa2e4eadb217ad8cc09b")

def test_gil(self): # Check things work fine with an input larger than the size required

--- a/Lib/test/test_marshal.py +++ b/Lib/test/test_marshal.py @@ -288,19 +288,19 @@ class LargeValuesTestCase(unittest.TestC def check_unmarshallable(self, data): self.assertRaises(ValueError, marshal.dump, data, NullWriter())

@@ -316,7 +316,7 @@ class LargeValuesTestCase(unittest.TestC def test_frozenset(self, size): self.check_unmarshallable(frozenset(range(size)))

--- a/Lib/test/test_xml_etree_c.py +++ b/Lib/test/test_xml_etree_c.py @@ -13,10 +13,8 @@ cET_alias = import_fresh_module('xml.etr class MiscTests(unittest.TestCase): # Issue #8651.

--- a/Misc/NEWS +++ b/Misc/NEWS @@ -58,6 +58,11 @@ IDLE