mirror of
https://github.com/python/cpython.git
synced 2025-11-01 10:45:30 +00:00
GH-128534: Fix behavior of branch monitoring for async for (GH-130847)
* Both branches in a pair now have a common source and are included in co_branches
This commit is contained in:
parent
e5527f2cdd
commit
89df62c120
17 changed files with 235 additions and 154 deletions
|
|
@ -953,6 +953,15 @@ class CodeLocationTest(unittest.TestCase):
|
|||
get_line_branches(with_extended_args),
|
||||
[(1,2,8)])
|
||||
|
||||
async def afunc():
|
||||
async for letter in async_iter1:
|
||||
2
|
||||
3
|
||||
|
||||
self.assertEqual(
|
||||
get_line_branches(afunc),
|
||||
[(1,1,3)])
|
||||
|
||||
if check_impl_detail(cpython=True) and ctypes is not None:
|
||||
py = ctypes.pythonapi
|
||||
freefunc = ctypes.CFUNCTYPE(None,ctypes.c_voidp)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue