code: def test_decode(self):
      from io import BytesIO, StringIO
  
      infp = BytesIO(b"d3d3LnB5dGhvbi5vcmc=")
      outfp = BytesIO()
      base64.decode(infp, outfp)
      self.assertEqual(outfp.getvalue(), b"www.python.org")
      # Non-binary files
      self.assertRaises(
          TypeError, base64.encode, StringIO("YWJj\n"), BytesIO()
      )
      self.assertRaises(
          TypeError, base64.encode, BytesIO(b"YWJj\n"), StringIO()
      )
      self.assertRaises(
          TypeError, base64.encode, StringIO("YWJj\n"), StringIO()
      )
  
imports: import unittest
  import base64
  import binascii
  import os
  from array import array
  from test.support import os_helper
  from test.support import script_helper
label_desc: Use image node_id 5 for calling the LegacyBase64TestCase obj's underlying member method code with example usage: obj.test_decode() without return types