Skip to content

Commit 7dfe7d4

Browse files
committed
Added test on take crash
1 parent 7ad9ade commit 7dfe7d4

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

tests/test_tube.py

+5
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,11 @@ async def test__tube_take(self):
3030
self.assertEqual(taken_t.status, Status.TAKEN)
3131
self.assertDictEqual(taken_t.data, t.data)
3232

33+
async def test__tube_take_no_tasks(self):
34+
tube = self.create_tube()
35+
taken_t = await tube.take(0.5)
36+
self.assertIsNone(taken_t)
37+
3338
async def test__tube_ack(self):
3439
tube = self.create_tube()
3540
t = await tube.put(self._data_obj())

0 commit comments

Comments
 (0)