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

Class C

Lib/test/test_contextlib.py:410–412  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

408 def test_closing(self):
409 state = []
410 class C:
411 def close(self):
412 state.append(1)
413 x = C()
414 self.assertEqual(state, [])
415 with closing(x) as y:

Callers 3

test_closingMethod · 0.70
test_closing_errorMethod · 0.70
test_nullcontextMethod · 0.70

Calls

no outgoing calls

Tested by 3

test_closingMethod · 0.56
test_closing_errorMethod · 0.56
test_nullcontextMethod · 0.56