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

Method _close

Lib/test/test__interpchannels.py:1736–1743  ·  view source on GitHub ↗
(self, fix, *, force)

Source from the content-addressed store, hash-verified

1734 yield ChannelCloseFixture(end, interp, other, extra, creator)
1735
1736 def _close(self, fix, *, force):
1737 op = 'force-close' if force else 'close'
1738 close = ChannelAction(op, fix.end, 'same')
1739 if not fix.expect_closed_error():
1740 self.run_action(fix, close, hideclosed=False)
1741 else:
1742 with self.assertRaises(_channels.ChannelClosedError):
1743 self.run_action(fix, close, hideclosed=False)
1744
1745 def _assert_closed_in_interp(self, fix, interp=None):
1746 if interp is None or interp.name == 'main':

Callers 4

test_closeMethod · 0.95
test_force_closeMethod · 0.95
__del__Method · 0.45
test__closeMethod · 0.45

Calls 4

run_actionMethod · 0.95
ChannelActionClass · 0.85
expect_closed_errorMethod · 0.80
assertRaisesMethod · 0.45

Tested by

no test coverage detected