def test_create_context(display): record_range = xrecord.alloc_range() record_range.contents.device_events.first = xlib.KEY_PRESS record_range.contents.device_events.last = xlib.KEY_RELEASE context = None try: context = xrecord.create_context( display, 0, xrecord.ALL_CLIENTS, record_range) assert context finally: if context: assert xrecord.free_context(display, context)
def test_create_context(display): record_range = xrecord.alloc_range() record_range.contents.device_events.first = xlib.KEY_PRESS record_range.contents.device_events.last = xlib.KEY_RELEASE context = None try: context = xrecord.create_context(display, 0, xrecord.ALL_CLIENTS, record_range) assert context finally: if context: assert xrecord.free_context(display, context)
def test_alloc_range(): r = xrecord.alloc_range() assert r xlib.free(r)