MCPcopy Index your code
hub / github.com/RustPython/RustPython / __enter__

Method __enter__

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

Source from the content-addressed store, hash-verified

2505 self._in_context = False
2506
2507 def __enter__(self):
2508 if self._in_context:
2509 raise ValueError('Re-entering ThreadedEchoServer context')
2510 self._in_context = True
2511 self.start(threading.Event())
2512 self.flag.wait()
2513 return self
2514
2515 def __exit__(self, *args):
2516 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