mirror of
https://github.com/python/cpython.git
synced 2025-11-01 18:51:43 +00:00
gh-118414: Fix assertion in YIELD_VALUE when tracing lines or instrs (#118683)
This commit is contained in:
parent
b2cd54a4fb
commit
0d9148823d
5 changed files with 21 additions and 3 deletions
|
|
@ -656,6 +656,17 @@ class LineMonitoringTest(MonitoringTestBase, unittest.TestCase):
|
|||
|
||||
self.check_lines(func2, [1,2,3,4,5,6])
|
||||
|
||||
def test_generator_with_line(self):
|
||||
|
||||
def f():
|
||||
def a():
|
||||
yield
|
||||
def b():
|
||||
yield from a()
|
||||
next(b())
|
||||
|
||||
self.check_lines(f, [1,3,5,4,2,4])
|
||||
|
||||
class TestDisable(MonitoringTestBase, unittest.TestCase):
|
||||
|
||||
def gen(self, cond):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue