Projet2-ChaineDeProd/test_addition.py
2023-12-21 09:57:54 +01:00

11 lines
199 B
Python

from src.calculator import add
import pytest
def test_add():
result = add(3, 4)
assert result == 7
def test_add_string():
with pytest.raises(TypeError):
add("string", 4)