File tree Expand file tree Collapse file tree 1 file changed +14
-0
lines changed
Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -118,6 +118,20 @@ def test_b64encode_warns(self):
118118 warnings .simplefilter ('always' , UserWarning )
119119 base64 .b64encode (b'test' )
120120 self .assertTrue (any ('base64.b64encode returns str in Python 2 (bytes in 3.x)' == str (x .message ) for x in w ))
121+
122+ def test_b32encode_warns (self ):
123+ import warnings , base64
124+ with warnings .catch_warnings (record = True ) as w :
125+ warnings .simplefilter ('always' , UserWarning )
126+ base64 .b32encode (b'test' )
127+ self .assertTrue (any ('base64.b32encode returns str in Python 2 (bytes in 3.x)' == str (x .message ) for x in w ))
128+
129+ def test_b16encode_warns (self ):
130+ import warnings , base64
131+ with warnings .catch_warnings (record = True ) as w :
132+ warnings .simplefilter ('always' , UserWarning )
133+ base64 .b16encode (b'test' )
134+ self .assertTrue (any ('base64.b16encode returns str in Python 2 (bytes in 3.x)' == str (x .message ) for x in w ))
121135
122136 def test_b64decode (self ):
123137 eq = self .assertEqual
You can’t perform that action at this time.
0 commit comments