diff options
-rwxr-xr-x | Lib/test/test_binascii.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/Lib/test/test_binascii.py b/Lib/test/test_binascii.py index 5b45f7d..d4a905a 100755 --- a/Lib/test/test_binascii.py +++ b/Lib/test/test_binascii.py @@ -1,6 +1,6 @@ """Test the binascii C module.""" -from test_support import verify, verbose +from test_support import verify, verbose, have_unicode import binascii # Show module doc string @@ -112,7 +112,9 @@ else: print 'expected TypeError not raised' # 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) try: |