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

Method __enter__

Lib/test/test_ssl.py:2786–2792  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

2784 self._in_context = False
2785
2786 def __enter__(self):
2787 if self._in_context:
2788 raise ValueError('Re-entering ThreadedEchoServer context')
2789 self._in_context = True
2790 self.start(threading.Event())
2791 self.flag.wait()
2792 return self
2793
2794 def __exit__(self, *args):
2795 assert self._in_context

Callers

nothing calls this directly

Calls 3

startMethod · 0.95
EventMethod · 0.80
waitMethod · 0.45

Tested by

no test coverage detected