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