code: def test_abstract(self):
      self.assertRaises(TypeError, Array.from_buffer, bytearray(10))
      self.assertRaises(TypeError, Structure.from_buffer, bytearray(10))
      self.assertRaises(TypeError, Union.from_buffer, bytearray(10))
      self.assertRaises(TypeError, _CFuncPtr.from_buffer, bytearray(10))
      self.assertRaises(TypeError, _Pointer.from_buffer, bytearray(10))
      self.assertRaises(
          TypeError, _SimpleCData.from_buffer, bytearray(10)
      )
  
      self.assertRaises(TypeError, Array.from_buffer_copy, b"123")
      self.assertRaises(TypeError, Structure.from_buffer_copy, b"123")
      self.assertRaises(TypeError, Union.from_buffer_copy, b"123")
      self.assertRaises(TypeError, _CFuncPtr.from_buffer_copy, b"123")
      self.assertRaises(TypeError, _Pointer.from_buffer_copy, b"123")
      self.assertRaises(
          TypeError, _SimpleCData.from_buffer_copy, b"123"
      )
  
file_path: cpython/Lib/test/test_ctypes/test_frombuffer.py
imports: import array
  import gc
  import unittest
  from ctypes import Structure, Union, Array, sizeof, _Pointer, _SimpleCData, _CFuncPtr, c_char, c_int
label_desc: Use image node_id 7 for calling the Test obj's underlying member method code with example usage: obj.test_abstract() without return types