[Python-3000] need help fixing broken tests in py3k-pep3137 branch
Paul Moore
p.f.moore at gmail.com
Sat Nov 3 13:50:08 CET 2007
On 03/11/2007, Guido van Rossum <guido at python.org> wrote:
> In the py3k-pep3137 branch I've been working on the implementation of PEP 3137.
> The work is largely done, but I'm stuck with about 20 failing tests,
> and very little time this weekend to work on these. Here's the list:
>
> test_array
One of the failures here is in
def test_create_from_bytes(self):
a = array.array('H', b"1234")
self.assertEqual(len(a) * a.itemsize, 4)
Traceback (most recent call last):
File "Lib/test/test_array.py", line 737, in test_create_from_bytes
self.assertEqual(len(a) * a.itemsize, 4)
AssertionError: 8 != 4
However, 'H' is unsigned short, so I'd expect a.itemsize to be 2, and
so the results *should* be 8 rather than 4.
Is this just a bug in the test?
Paul.
More information about the Python-3000
mailing list