diff options
Diffstat (limited to 'Lib/test/test_binascii.py')
-rwxr-xr-x | Lib/test/test_binascii.py | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/Lib/test/test_binascii.py b/Lib/test/test_binascii.py index b01f0e0..8df4504 100755 --- a/Lib/test/test_binascii.py +++ b/Lib/test/test_binascii.py @@ -148,6 +148,16 @@ class BinASCIITest(unittest.TestCase): "0"*75+"=\r\n=FF\r\n=FF\r\n=FF" ) + def test_empty_string(self): + # A test for SF bug #1022953. Make sure SystemError is not raised. + for n in ['b2a_qp', 'a2b_hex', 'b2a_base64', 'a2b_uu', 'a2b_qp', + 'b2a_hex', 'unhexlify', 'hexlify', 'crc32', 'b2a_hqx', + 'a2b_hqx', 'a2b_base64', 'rlecode_hqx', 'b2a_uu', + 'rledecode_hqx']: + f = getattr(binascii, n) + f('') + binascii.crc_hqx('', 0) + def test_main(): test_support.run_unittest(BinASCIITest) |