MCPcopy Index your code
hub / github.com/python/cpython / test_close_single_user

Method test_close_single_user

Lib/test/test__interpchannels.py:1046–1055  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

1044 # close
1045
1046 def test_close_single_user(self):
1047 cid = _channels.create(REPLACE)
1048 _channels.send(cid, b'spam', blocking=False)
1049 recv_nowait(cid)
1050 _channels.close(cid)
1051
1052 with self.assertRaises(_channels.ChannelClosedError):
1053 _channels.send(cid, b'eggs')
1054 with self.assertRaises(_channels.ChannelClosedError):
1055 _channels.recv(cid)
1056
1057 def test_close_multiple_users(self):
1058 cid = _channels.create(REPLACE)

Callers

nothing calls this directly

Calls 6

recv_nowaitFunction · 0.85
createMethod · 0.45
sendMethod · 0.45
closeMethod · 0.45
assertRaisesMethod · 0.45
recvMethod · 0.45

Tested by

no test coverage detected