Commit 76567d05 authored by Mark Florisson's avatar Mark Florisson

Take first Cython step into function before reading variable in test

parents 7d98e4a1 9140d0f9
......@@ -1619,7 +1619,6 @@ class DebugTransform(CythonTransform):
self.register_stepinto = True
self.serialize_modulenode_as_function(node)
self.register_stepinto = False
self.tb.end('Functions')
# 2.3 compatibility. Serialize global variables
......
......@@ -356,6 +356,9 @@ class TestClosure(DebugTestCase):
def test_cython_closure(self):
self.break_and_run('def inner():')
# Allow the Cython-generated code to initialize the scope variable
gdb.execute('cy step')
self.assertEqual(str(self.read_var('a')), '1')
print_result = gdb.execute('cy print a', to_string=True).strip()
self.assertEqual(print_result, 'a = 1')
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment