7 --- learning python unittest second class methods, assert correlation method

assertEqual(firstsecondmsg=None)

Equal only first and second, is passed, or not passed. first and second can be of any type, call a specific type of a function equal judgment when determining whether or not the same, it will give a clear error message.

assertNotEqual(firstsecondmsg=None)

Only first and second are not equal, it is passed, or not passed.

assertTrue(exprmsg=None)assertFalse(exprmsg=None)

 

Wherein the judgment bool (expr), not referring expr True or False

 

assertIs(firstsecondmsg=None)assertIsNot(firstsecondmsg=None)

assertIsNone(exprmsg=None)assertIsNotNone(exprmsg=None)

assertIn(firstsecondmsg=None)assertNotIn(firstsecondmsg=None)

assertIsInstance(objclsmsg=None)assertNotIsInstance(objclsmsg=None)

Guess you like

Origin www.cnblogs.com/dmtz/p/10974293.html