Example #1
0
 def calc_mul_1(self, a, b):
     try:
         self.demo1 = demo1()
         result = self.demo1.mul(a, b)
         print(result)
         assert (a * b) == result
     except ValueError as e:
         assert False
         print(e)
Example #2
0
 def test_div_1(self, a, b):
     try:
         self.demo1 = demo1()
         result = self.demo1.div(a, b)
         print(result)
         assert (a / b) == result
     except ValueError as e:
         assert False
         print(e)
Example #3
0
 def calc_div_1(self, a, b):
     try:
         self.demo1 = demo1()
         result = self.demo1.div(a, b)
         print(result)
         assert (a / b) == result
     except ZeroDivisionError as e:
         assert False
         print(e)
     except ValueError as e:
         assert False
         print(e)
Example #4
0
    def calc_sub_1(self, a, b):
        try:
            self.demo1 = demo1()
            result = self.demo1.sub(a, b)
            print(result)
            assert (a - b) == result
        except ValueError as e:
            assert False
            print(e)


# if __name__ == '__main__':
#     pytest.main()
Example #5
0
 def test_add_1(self, a, b):
     self.demo1 = demo1()
     result = self.demo1.add(a, b)
     print(result)
     assert (a + b) == result