Code
Hub
Workspaces
Following
Digest
Agents
Trending
Connect
MCP
copy
Index your code
hub
/
github.com/python/cpython
/ close
Method
close
Lib/test/test_yield_from.py:955–957 ·
view source on GitHub ↗
(self_)
Source
from the content-addressed store, hash-verified
953
def
__next__(self):
954
return
42
955
def
close(self_):
956
self.assertTrue(g1.gi_running)
957
self.assertRaises(ValueError, next, g1)
958
def
one():
959
yield
from
MyIt()
960
g1 = one()
Callers
12
test_delegating_close
Method · 0.45
test_handing_exception_while_delegating_close
Method · 0.45
test_delegation_of_close_to_non_generator
Method · 0.45
test_broken_getattr_handling
Method · 0.45
test_delegating_generators_claim_to_be_running_with_close
Method · 0.45
test_close_and_throw_work
Method · 0.45
test_close_and_throw_raise_generator_exit
Method · 0.45
test_close_and_throw_raise_stop_iteration
Method · 0.45
test_close_and_throw_raise_base_exception
Method · 0.45
test_close_and_throw_raise_exception
Method · 0.45
test_close_and_throw_yield
Method · 0.45
test_close_and_throw_return
Method · 0.45
Calls
2
assertTrue
Method · 0.80
assertRaises
Method · 0.45
Tested by
no test coverage detected