diff options
author | Antoine Pitrou <solipsis@pitrou.net> | 2009-01-03 16:59:18 (GMT) |
---|---|---|
committer | Antoine Pitrou <solipsis@pitrou.net> | 2009-01-03 16:59:18 (GMT) |
commit | c3b39245a7695cf39ba5524f59deeff52b00e5f9 (patch) | |
tree | 9736aa9a6d7c03b55eeb7d362a53f91d6000dda3 /Lib/test/test_sys.py | |
parent | 8bcddcabd770dd424b97d7c667ef8e5337436215 (diff) | |
download | cpython-c3b39245a7695cf39ba5524f59deeff52b00e5f9.zip cpython-c3b39245a7695cf39ba5524f59deeff52b00e5f9.tar.gz cpython-c3b39245a7695cf39ba5524f59deeff52b00e5f9.tar.bz2 |
Issue #4580: slicing of memoryviews when itemsize != 1 is wrong.
Also fix len() to return number of items rather than length in bytes.
I'm sorry it was not possible for me to work on this without reindenting
a bit some stuff around. The indentation in memoryobject.c is a mess,
I'll open a separate bug for it.
Diffstat (limited to 'Lib/test/test_sys.py')
-rw-r--r-- | Lib/test/test_sys.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/test/test_sys.py b/Lib/test/test_sys.py index a8c19ee..7655fbf 100644 --- a/Lib/test/test_sys.py +++ b/Lib/test/test_sys.py @@ -559,7 +559,7 @@ class SizeofTest(unittest.TestCase): check(32768*32768-1, size(vh) + 2*self.H) check(32768*32768, size(vh) + 3*self.H) # memory - check(memoryview(b''), size(h + 'P PP2P2i5P')) + check(memoryview(b''), size(h + 'P PP2P2i7P')) # module check(unittest, size(h + '3P')) # None |