Skip to content

Commit

Permalink
fix: RUF056 falsy-dict-fallback errors
Browse files Browse the repository at this point in the history
  • Loading branch information
alexfikl authored and inducer committed Jan 7, 2025
1 parent f1f0561 commit 4609015
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions test/test_wrapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -865,22 +865,22 @@ def event_waiter2(e, key):
evt = cl.UserEvent(ctx)
Thread(target=event_waiter1, args=(evt, 1)).start()
sleep(.05)
if status.get(1, False):
if status.get(1):
raise RuntimeError("UserEvent triggered before set_status")
evt.set_status(cl.command_execution_status.COMPLETE)
sleep(.05)
if not status.get(1, False):
if not status.get(1):
raise RuntimeError("UserEvent.wait timeout")
assert evt.command_execution_status == cl.command_execution_status.COMPLETE

evt = cl.UserEvent(ctx)
Thread(target=event_waiter2, args=(evt, 2)).start()
sleep(.05)
if status.get(2, False):
if status.get(2):
raise RuntimeError("UserEvent triggered before set_status")
evt.set_status(cl.command_execution_status.COMPLETE)
sleep(.05)
if not status.get(2, False):
if not status.get(2):
raise RuntimeError("cl.wait_for_events timeout on UserEvent")
assert evt.command_execution_status == cl.command_execution_status.COMPLETE

Expand Down

0 comments on commit 4609015

Please sign in to comment.