Skip to content

Commit

Permalink
Adjust some test logic
Browse files Browse the repository at this point in the history
  • Loading branch information
tdg5 committed Aug 15, 2024
1 parent a35c48d commit 0cf4e6b
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions reqless_test/test_events.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,14 @@ def func(event: Dict) -> None:
count += 1

self.client.events.on("popped", func)
print("pre thread", flush=True)
with self.client.events.thread():
print("pre pop", flush=True)
self.client.queues["foo"].pop()
print("post pop", flush=True)
print("post thread", flush=True)
self.assertEqual(count, 1)
print("post assert", flush=True)

def test_off(self) -> None:
"""Ensure we can turn off callbacks"""
Expand Down

0 comments on commit 0cf4e6b

Please sign in to comment.