@@ -664,17 +664,20 @@ def test_a85encode_wrapcol(self):
664664 b'<~\n GB\n \\ 6\n `E\n -Z\n P=\n Df\n .1\n GE\n b>\n ~>' )
665665 eq (base64 .a85encode (b , wrapcol = sys .maxsize ), b'GB\\ 6`E-ZP=Df.1GEb>' )
666666 if check_impl_detail ():
667- eq (base64 .a85encode (b , wrapcol = 2 ** 1000 ), b'GB\\ 6`E-ZP=Df.1GEb>' )
668- eq (base64 .a85encode (b , wrapcol = - 7 ),
669- b'G\n B\n \\ \n 6\n `\n E\n -\n Z\n P\n =\n D\n f\n .\n 1\n G\n E\n b\n >' )
670- eq (base64 .a85encode (b , wrapcol = - 7 , adobe = True ),
671- b'<~\n GB\n \\ 6\n `E\n -Z\n P=\n Df\n .1\n GE\n b>\n ~>' )
667+ eq (base64 .a85encode (b , wrapcol = sys .maxsize * 2 ),
668+ b'GB\\ 6`E-ZP=Df.1GEb>' )
669+ with self .assertRaises (OverflowError ):
670+ base64 .a85encode (b , wrapcol = 2 ** 1000 )
671+ with self .assertRaises (ValueError ):
672+ base64 .a85encode (b , wrapcol = - 7 )
673+ with self .assertRaises (ValueError ):
674+ base64 .a85encode (b , wrapcol = - 7 , adobe = True )
672675 with self .assertRaises (TypeError ):
673676 base64 .a85encode (b , wrapcol = 7.0 )
674677 with self .assertRaises (TypeError ):
675678 base64 .a85encode (b , wrapcol = '7' )
676- if check_impl_detail ( ):
677- eq ( base64 .a85encode (b , wrapcol = None ), b'GB \\ 6`E-ZP=Df.1GEb>' )
679+ with self . assertRaises ( TypeError ):
680+ base64 .a85encode (b , wrapcol = None )
678681 eq (base64 .a85encode (b'' , wrapcol = 0 ), b'' )
679682 eq (base64 .a85encode (b'' , wrapcol = 7 ), b'' )
680683 eq (base64 .a85encode (b'' , wrapcol = 1 , adobe = True ), b'<~\n ~>' )
0 commit comments