test_operator.py 文件源码

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

项目:web_ctp 作者: molebot 项目源码 文件源码
def test_is(self):
        a = b = 'xyzpdq'
        c = a[:3] + b[3:]
        self.assertRaises(TypeError, operator.is_)
        self.assertTrue(operator.is_(a, b))
        self.assertFalse(operator.is_(a,c))

    #brython fix me  (syntax error)
    #def test_is_not(self):
    #    a = b = 'xyzpdq'
    #    c = a[:3] + b[3:]
    #    self.assertRaises(TypeError, operator.is_not)
    #    self.assertFalse(operator.is_not(a, b))
    #    self.assertTrue(operator.is_not(a,c))
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号