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))
评论列表
文章目录