code: def test_create_event(self):
      from operator import lt, le, gt, ge
  
      fd = os.open(os.devnull, os.O_WRONLY)
      self.addCleanup(os.close, fd)
  
      ev = select.kevent(fd)
      other = select.kevent(1000)
      self.assertEqual(ev.ident, fd)
      self.assertEqual(ev.filter, select.KQ_FILTER_READ)
      self.assertEqual(ev.flags, select.KQ_EV_ADD)
      self.assertEqual(ev.fflags, 0)
      self.assertEqual(ev.data, 0)
      self.assertEqual(ev.udata, 0)
      self.assertEqual(ev, ev)
      self.assertNotEqual(ev, other)
      self.assertTrue(ev < other)
      self.assertTrue(other >= ev)
      for op in lt, le, gt, ge:
          self.assertRaises(TypeError, op, ev, None)
          self.assertRaises(TypeError, op, ev, 1)
          self.assertRaises(TypeError, op, ev, "ev")
  
      ev = select.kevent(fd, select.KQ_FILTER_WRITE)
      self.assertEqual(ev.ident, fd)
      self.assertEqual(ev.filter, select.KQ_FILTER_WRITE)
      self.assertEqual(ev.flags, select.KQ_EV_ADD)
      self.assertEqual(ev.fflags, 0)
      self.assertEqual(ev.data, 0)
      self.assertEqual(ev.udata, 0)
      self.assertEqual(ev, ev)
      self.assertNotEqual(ev, other)
  
      ev = select.kevent(
          fd, select.KQ_FILTER_WRITE, select.KQ_EV_ONESHOT
      )
      self.assertEqual(ev.ident, fd)
      self.assertEqual(ev.filter, select.KQ_FILTER_WRITE)
      self.assertEqual(ev.flags, select.KQ_EV_ONESHOT)
      self.assertEqual(ev.fflags, 0)
      self.assertEqual(ev.data, 0)
      self.assertEqual(ev.udata, 0)
      self.assertEqual(ev, ev)
      self.assertNotEqual(ev, other)
  
      ev = select.kevent(1, 2, 3, 4, 5, 6)
      self.assertEqual(ev.ident, 1)
      self.assertEqual(ev.filter, 2)
      self.assertEqual(ev.flags, 3)
      self.assertEqual(ev.fflags, 4)
      self.assertEqual(ev.data, 5)
      self.assertEqual(ev.udata, 6)
      self.assertEqual(ev, ev)
      self.assertNotEqual(ev, other)
  
      bignum = 0x7FFF
      ev = select.kevent(bignum, 1, 2, 3, bignum - 1, bignum)
      self.assertEqual(ev.ident, bignum)
      self.assertEqual(ev.filter, 1)
      self.assertEqual(ev.flags, 2)
      self.assertEqual(ev.fflags, 3)
      self.assertEqual(ev.data, bignum - 1)
      self.assertEqual(ev.udata, bignum)
      self.assertEqual(ev, ev)
      self.assertNotEqual(ev, other)
  
      # Issue 11973
      bignum = 0xFFFF
      ev = select.kevent(0, 1, bignum)
      self.assertEqual(ev.ident, 0)
      self.assertEqual(ev.filter, 1)
      self.assertEqual(ev.flags, bignum)
      self.assertEqual(ev.fflags, 0)
      self.assertEqual(ev.data, 0)
      self.assertEqual(ev.udata, 0)
      self.assertEqual(ev, ev)
      self.assertNotEqual(ev, other)
  
      # Issue 11973
      bignum = 0xFFFFFFFF
      ev = select.kevent(0, 1, 2, bignum)
      self.assertEqual(ev.ident, 0)
      self.assertEqual(ev.filter, 1)
      self.assertEqual(ev.flags, 2)
      self.assertEqual(ev.fflags, bignum)
      self.assertEqual(ev.data, 0)
      self.assertEqual(ev.udata, 0)
      self.assertEqual(ev, ev)
      self.assertNotEqual(ev, other)
  
file_path: cpython/Lib/test/test_kqueue.py
imports: import errno
  import os
  import select
  import socket
  from test import support
  import time
  import unittest
label_desc: Use image node_id 2 for calling the TestKQueue obj's underlying member method code with example usage: obj.test_create_event() without return types