断言:
这里介绍以下几个断言方法:
assertEqual
assertNotEqual
assertTrue
assertFalse
assertIsNone
assertIsNotNone
(一)assertEqual 和 assertNotEqual
assertEqual:如两个值相等,则pass
assertNotEqual:如两个值不相等,则pass
(二)assertTrue和assertFalse
assertTrue:判断bool值为True,则pass
assertFalse:判断bool值为False,则Pass
(三)assertIsNone和assertIsNotNone
assertIsNone:不存在,则pass
assertIsNotNone:存在,则pass