diff options
author | Barry Warsaw <barry@python.org> | 2002-08-15 22:14:24 (GMT) |
---|---|---|
committer | Barry Warsaw <barry@python.org> | 2002-08-15 22:14:24 (GMT) |
commit | 0a51b58e6b5ffd3cc17722f4ae19893ed486f3c9 (patch) | |
tree | 8779c759e1dfd74bd7e3d02042d12294099ba604 /Lib/test | |
parent | 7ca993ed37f84491885cc2d96ae7d1a575a7a2f4 (diff) | |
download | cpython-0a51b58e6b5ffd3cc17722f4ae19893ed486f3c9.zip cpython-0a51b58e6b5ffd3cc17722f4ae19893ed486f3c9.tar.gz cpython-0a51b58e6b5ffd3cc17722f4ae19893ed486f3c9.tar.bz2 |
base64.decodestring('') should return '' instead of raising an
exception. The bug fix for SF #430849 wasn't quite right. This
closes SF bug #595671. I'll backport this to Python 2.2.
Diffstat (limited to 'Lib/test')
-rw-r--r-- | Lib/test/test_base64.py | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/Lib/test/test_base64.py b/Lib/test/test_base64.py index 223c388..42e3c81 100644 --- a/Lib/test/test_base64.py +++ b/Lib/test/test_base64.py @@ -44,12 +44,7 @@ class Base64TestCase(unittest.TestCase): "YWJjZGVmZ2hpamtsbW5vcHFyc3R1dnd4eXpBQkNERUZHSElKS0xNTk9QUVJTVFVWV1hZWjAxMjM0\nNTY3ODkhQCMwXiYqKCk7Ojw+LC4gW117fQ==\n") == "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789!@#0^&*();:<>,. []{}", reason = "long decodestring failed") - try: - base64.decodestring("") - except binascii_error: - pass - else: - self.fail("expected a binascii.Error on null decode request") + test_support.verify(base64.decodestring('') == '') def test_main(): test_support.run_unittest(Base64TestCase) |