Skip to content

Commit 6946495

Browse files
Clear the item if timed out.
1 parent b3cfcc2 commit 6946495

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

Lib/test/test__xxinterpchannels.py

+6-2
Original file line numberDiff line numberDiff line change
@@ -633,7 +633,9 @@ def test_send_timeout(self):
633633
cid = channels.create()
634634
with self.assertRaises(TimeoutError):
635635
channels.send(cid, obj, blocking=True, timeout=0.1)
636-
# XXX Verify the channel is empty now.
636+
with self.assertRaises(channels.ChannelEmptyError):
637+
received = channels.recv(cid)
638+
print(repr(received))
637639

638640
with self.subTest('timeout not hit'):
639641
cid = channels.create()
@@ -668,7 +670,9 @@ def test_send_buffer_timeout(self):
668670
cid = channels.create()
669671
with self.assertRaises(TimeoutError):
670672
channels.send_buffer(cid, obj, blocking=True, timeout=0.1)
671-
# XXX Verify the channel is empty now.
673+
with self.assertRaises(channels.ChannelEmptyError):
674+
received = channels.recv(cid)
675+
print(repr(received))
672676

673677
with self.subTest('timeout not hit'):
674678
cid = channels.create()

0 commit comments

Comments
 (0)