mirror of
https://github.com/python/cpython.git
synced 2025-10-10 00:43:41 +00:00
easy --disable-unicode proofing.
This commit is contained in:
parent
d95c828307
commit
286225b548
1 changed files with 4 additions and 2 deletions
|
@ -1,6 +1,6 @@
|
||||||
"""Test the binascii C module."""
|
"""Test the binascii C module."""
|
||||||
|
|
||||||
from test_support import verify, verbose
|
from test_support import verify, verbose, have_unicode
|
||||||
import binascii
|
import binascii
|
||||||
|
|
||||||
# Show module doc string
|
# Show module doc string
|
||||||
|
@ -112,7 +112,9 @@ else:
|
||||||
print 'expected TypeError not raised'
|
print 'expected TypeError not raised'
|
||||||
|
|
||||||
# Verify the treatment of Unicode strings
|
# Verify the treatment of Unicode strings
|
||||||
verify(binascii.hexlify(u'a') == '61', "hexlify failed for Unicode")
|
if have_unicode:
|
||||||
|
verify(binascii.hexlify(unicode('a', 'ascii')) == '61',
|
||||||
|
"hexlify failed for Unicode")
|
||||||
|
|
||||||
# A test for SF bug 534347 (segfaults without the proper fix)
|
# A test for SF bug 534347 (segfaults without the proper fix)
|
||||||
try:
|
try:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue