test.py 文件源码

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

项目:CloudPrint 作者: William-An 项目源码 文件源码
def check_output(self, want, got, optionflags):
        if not PY2:
            #Differences between unicode strings representations : u"foo" -> "foo"
            want = re.sub("u'(.*?)'", "'\\1'", want) 
            want = re.sub('u"(.*?)"', '"\\1"', want)

            #NameError message has changed
            want = want.replace('NameError: global name', 'NameError: name')
        else:
            want = re.sub("^b'(.*?)'", "'\\1'", want) 
            want = re.sub('^b"(.*?)"', '"\\1"', want)
        return doctest.OutputChecker.check_output(self, want, got, optionflags)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号