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

Class TestCM

Lib/test/test_unittest/test_async_case.py:18–28  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

16
17
18class TestCM:
19 def __init__(self, ordering, enter_result=None):
20 self.ordering = ordering
21 self.enter_result = enter_result
22
23 async def __aenter__(self):
24 self.ordering.append('enter')
25 return self.enter_result
26
27 async def __aexit__(self, *exc_info):
28 self.ordering.append('exit')
29
30
31class LacksEnterAndExit:

Callers 1

test_funcMethod · 0.70

Calls

no outgoing calls

Tested by 1

test_funcMethod · 0.56

Used in the wild real call sites across dependent graphs

searching dependent graphs…