code: def test_single_bitfield_size(self):
      for c_typ in int_types:
          result = self.fail_fields(("a", c_typ, -1))
          self.assertEqual(
              result,
              (ValueError, "number of bits invalid for bit field"),
          )
  
          result = self.fail_fields(("a", c_typ, 0))
          self.assertEqual(
              result,
              (ValueError, "number of bits invalid for bit field"),
          )
  
          class X(Structure):
              _fields_ = [("a", c_typ, 1)]
  
          self.assertEqual(sizeof(X), sizeof(c_typ))
  
          class X(Structure):
              _fields_ = [("a", c_typ, sizeof(c_typ) * 8)]
  
          self.assertEqual(sizeof(X), sizeof(c_typ))
  
          result = self.fail_fields(("a", c_typ, sizeof(c_typ) * 8 + 1))
          self.assertEqual(
              result,
              (ValueError, "number of bits invalid for bit field"),
          )
  
imports: import _ctypes_test
  import os
  import unittest
  from ctypes import CDLL, Structure, sizeof, POINTER, byref, alignment, LittleEndianStructure, BigEndianStructure, c_byte, c_ubyte, c_char, c_char_p, c_void_p, c_wchar, c_uint32, c_uint64, c_short, c_ushort, c_int, c_uint, c_long, c_ulong, c_longlong, c_ulonglong
  from test import support
label_desc: Use image node_id 8 for calling the BitFieldTest obj's underlying member method code with example usage: obj.test_single_bitfield_size() without return types