Пример #1
0
 def test_add2(self):
     print('执行add2方法')
     print('--2')
     d = Math(1, 3)
     expect = d.add2()
     try:
         self.assertEqual(expect, 3)
     except AssertionError as msg:
         print(msg)
Пример #2
0
 def test_add1(self):
     print('执行add1方法')
     print('--1')
     d = Math(1, 2)
     expect = d.add1()
     self.assertEqual(expect, 3)