class_docstr: Test that all type conversions are working.
class_docstr_tok: ["Test","that","all","type","conversions","are","working","."]
code: def testBinaryRoundTrip(self):
      # test to make sure buffers returned by psycopg2 are
      # understood by execute:
      s = bytes(range(256))
      buf = self.execute(
          "SELECT %s::bytea AS foo", (psycopg2.Binary(s),)
      )
      buf2 = self.execute("SELECT %s::bytea AS foo", (buf,))
      self.assertEqual(s, buf2.tobytes())
  
imports: import string
  import ctypes
  import decimal
  import datetime
  import platform
  from .None import testutils
  import unittest
  from .testutils import ConnectingTestCase, restore_types
  from .testutils import skip_if_crdb
  import psycopg2
  from psycopg2.extensions import AsIs, adapt, register_adapter
label_desc: Use image node_id 12 for calling the TypesBasicTests obj's underlying member method code with example usage: obj.testBinaryRoundTrip() without return types