class Test(unittest.TestCase):
    def setUp(self):
        self.obj = Application()
    def test_sum(self):
        assert self.obj.add(3,1) , 4
    def test_diff(self):
        assert self.obj.sub(4,1) , 3
    def test_mul(self):
        assert self.obj.mul(4,3) , 12
    def test_div(self):
        assert self.obj.div(4,2) , 2
    def test_sqrt(self):
        assert self.obj.sqrt(9) , 3
    def test_log(self):
        assert self.obj.log(10) , 1
    def test_exp(self):
        assert  self.obj.exp(3,3) , 9
Ejemplo n.º 2
0
 def test_all2(self):
     obj = Application()
     assert obj.div(obj.add(obj.mul(2, 1), 3), obj.sub(6, 1)), 1
Ejemplo n.º 3
0
 def test_all1(self):
     obj = Application()
     assert obj.add(obj.mul(2, 3), obj.sub(obj.div(2, 2), 1)), 7
Ejemplo n.º 4
0
 def test_div(self):
     obj = Application()
     assert obj.div(4, 4), 1