Example #1
0
 def test_float_inp(self, inp):
     with pytest.raises(TypeError):
         intadd(inp[0], inp[1])
Example #2
0
 def test_valid_inp(self, inp, res):
     assert intadd(inp[0], inp[1]) == res
Example #3
0
 def test_negative_inp1(self):
     with pytest.raises(TypeError):
         intadd(-1, 1)
Example #4
0
 def test_negative_inp2(self):
     with pytest.raises(TypeError):
         intadd(1, -1)
Example #5
0
 def test_basic_addition(self):
     assert intadd(2, 4) == 6