def test_sticky_range():
def fn():
set_trace()
a = 1
b = 2
c = 3
return a
_, lineno = inspect.getsourcelines(fn)
start = lineno + 1
end = lineno + 3
check(fn, """
[NUM] > .*fn()
-> a = 1
# sticky %d %d
CLEAR>.*
%d set_trace()
NUM -> a = 1
NUM b = 2
# c
""" % (start, end, start))
评论列表
文章目录