testcase.py 文件源码

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

项目:QTAF 作者: Tencent 项目源码 文件源码
def _get_current_traceback(self, thread ):
        '''????????????

        :param thread: ????????
        :type thread: Thread
        '''
        for thread_id, stack in sys._current_frames().items():
            if thread_id != thread.ident:
                continue
            tb = "Traceback ( thread-%d possibly hold at ):\n" % thread_id
            for filename, lineno, name, line in traceback.extract_stack(stack):
                tb += '  File: "%s", line %d, in %s\n' % (filename, lineno, name)
                if line:
                    tb += "    %s\n" % (line.strip())
            return tb
        else:
            raise RuntimeError("thread not found")
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号