diff options
author | Serhiy Storchaka <storchaka@gmail.com> | 2015-02-03 09:30:10 (GMT) |
---|---|---|
committer | Serhiy Storchaka <storchaka@gmail.com> | 2015-02-03 09:30:10 (GMT) |
commit | 87d0b45485e1042b0eae8aedf98fa3ebb29846b8 (patch) | |
tree | ed9f1f1a2c2b41ffc2da17d9f42459222e335420 /Lib/test/test_memoryio.py | |
parent | 83e802796c80f46be616b48020356f7f51be533d (diff) | |
download | cpython-87d0b45485e1042b0eae8aedf98fa3ebb29846b8.zip cpython-87d0b45485e1042b0eae8aedf98fa3ebb29846b8.tar.gz cpython-87d0b45485e1042b0eae8aedf98fa3ebb29846b8.tar.bz2 |
Issue #15381: Optimized io.BytesIO to make less allocations and copyings.
Diffstat (limited to 'Lib/test/test_memoryio.py')
-rw-r--r-- | Lib/test/test_memoryio.py | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/Lib/test/test_memoryio.py b/Lib/test/test_memoryio.py index 24d282a..77749e7 100644 --- a/Lib/test/test_memoryio.py +++ b/Lib/test/test_memoryio.py @@ -718,12 +718,11 @@ class CBytesIOTest(PyBytesIOTest): @support.cpython_only def test_sizeof(self): - basesize = support.calcobjsize('P2nN2PnP') + basesize = support.calcobjsize('P2n2Pn') check = self.check_sizeof self.assertEqual(object.__sizeof__(io.BytesIO()), basesize) check(io.BytesIO(), basesize ) - check(io.BytesIO(b'a'), basesize + 1 ) - check(io.BytesIO(b'a' * 1000), basesize + 1000) + check(io.BytesIO(b'a' * 1000), basesize + sys.getsizeof(b'a' * 1000)) # Various tests of copy-on-write behaviour for BytesIO. |