test_pdb.py 文件源码

python
阅读 32 收藏 0 点赞 0 评论 0

项目:pdb 作者: antocuni 项目源码 文件源码
def test_single_question_mark():
    def fn():
        def f2(x, y):
            """Return product of x and y"""
            return x * y
        set_trace()
        a = 1
        b = 2
        c = 3
        return a+b+c

    # import pdb; pdb.set_trace()
    check(fn, """
[NUM] > .*fn()
-> a = 1
# f2
<function .*f2 at .*>
# f2?
.*Type:.*function
.*String Form:.*<function .*f2 at .*>
.*File:.*test_pdb.py
.*Definition:.*f2(x, y)
.*Docstring:.*Return product of x and y
# c
""")
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号