You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
assignee='https://github.com/loewis'closed_at=<Date2008-12-05.01:44:06.112>created_at=<Date2008-12-04.03:15:18.849>labels= ['extension-modules']
title='test_binascii is failing'updated_at=<Date2008-12-05.01:44:06.110>user='https://github.com/rhettinger'
test_binascii.py fails because crc32 accepts a string.
From my WindowsXP box:
C:\Python30>python \python30\lib\test\test_binascii.py
test_base64invalid (main.BinASCIITest) ... ok
test_base64valid (main.BinASCIITest) ... ok
test_crc32 (main.BinASCIITest) ... ok
test_empty_string (main.BinASCIITest) ... ok
test_exceptions (main.BinASCIITest) ... ok
test_functions (main.BinASCIITest) ... ok
test_hex (main.BinASCIITest) ... ok
test_no_binary_strings (main.BinASCIITest) ... FAIL
test_qp (main.BinASCIITest) ... ok
test_uu (main.BinASCIITest) ... ok
Traceback (most recent call last):
File "\python30\lib\test\test_binascii.py", line 177, in
test_no_binary_strings
self.assertRaises(TypeError, f, "test")
AssertionError: TypeError not raised by crc32
Ran 10 tests in 0.016s
FAILED (failures=1)
Traceback (most recent call last):
File "\python30\lib\test\test_binascii.py", line 183, in <module>
test_main()
File "\python30\lib\test\test_binascii.py", line 180, in test_main
support.run_unittest(BinASCIITest)
File "C:\Python30\lib\test\support.py", line 698, in run_unittest
_run_suite(suite)
File "C:\Python30\lib\test\support.py", line 681, in _run_suiteraise TestFailed(err)
test.support.TestFailed: Traceback (most recent call last):
File "\python30\lib\test\test_binascii.py", line 177, in
test_no_binary_strings
self.assertRaises(TypeError, f, "test")
AssertionError: TypeError not raised by crc32
The problem is that the Windows implementation of crc32 is different
from the Unix implementation, and that implementation was missed in
r67472. The fix should be fairly trivial.
Activity
rhettinger commentedon Dec 4, 2008
test_binascii.py fails because crc32 accepts a string.
From my WindowsXP box:
C:\Python30>python \python30\lib\test\test_binascii.py
test_base64invalid (main.BinASCIITest) ... ok
test_base64valid (main.BinASCIITest) ... ok
test_crc32 (main.BinASCIITest) ... ok
test_empty_string (main.BinASCIITest) ... ok
test_exceptions (main.BinASCIITest) ... ok
test_functions (main.BinASCIITest) ... ok
test_hex (main.BinASCIITest) ... ok
test_no_binary_strings (main.BinASCIITest) ... FAIL
test_qp (main.BinASCIITest) ... ok
test_uu (main.BinASCIITest) ... ok
======================================================================
FAIL: test_no_binary_strings (main.BinASCIITest)
----------------------------------------------------------------------
Traceback (most recent call last): File "\python30\lib\test\test_binascii.py", line 177, in test_no_binary_strings self.assertRaises(TypeError, f, "test") AssertionError: TypeError not raised by crc32Ran 10 tests in 0.016s
loewis commentedon Dec 4, 2008
The problem is that the Windows implementation of crc32 is different
from the Unix implementation, and that implementation was missed in
r67472. The fix should be fairly trivial.
amauryfa commentedon Dec 5, 2008
I fixed this in r67541 and r67542, with bpo-4542.
(sorry I did not see this one)