import unittest
class testEx(unittest.TestCase):
"""docstring for testEx"""
def setUp(self):
pass
def test_AA(self):
#msg参数可选
self.assertEqual('1','1',msg = 'aaa')
'''
'assertAlmostEqual',
'assertAlmostEquals',
'assertCountEqual',
'assertDictContainsSubset',
'assertDictEqual',
'assertEqual',
'assertEquals',
'assertFalse',
'assertGreater',
'assertGreaterEqual',
'assertIn',
'assertIs',
'assertIsInstance',
'assertIsNone',
'assertIsNot',
'assertIsNotNone',
'assertLess',
'assertLessEqual',
'assertListEqual',
'assertLogs',
'assertMultiLineEqual',
'assertNotAlmostEqual',
'assertNotAlmostEquals',
'assertNotEqual',
'assertNotEquals',
'assertNotIn',
'assertNotIsInstance',
'assertNotRegex',
'assertNotRegexpMatches',
'assertRaises',
'assertRaisesRegex',
'assertRaisesRegexp',
'assertRegex',
'assertRegexpMatches',
'assertSequenceEqual',
'assertSetEqual',
'assertTrue',
'assertTupleEqual',
'assertWarns',
'assertWarnsRegex'
'''
def tearDown(self):
pass
if __name__ == '__main__':
unittest.main()
网友评论