Skip to content
Snippets Groups Projects
Commit 977ed67b authored by Clément Charlier's avatar Clément Charlier
Browse files

mod

parent 757d6d67
Branches
No related tags found
No related merge requests found
Pipeline #46389 failed
......@@ -3,7 +3,7 @@ Test module for the calculator module.
"""
import pytest
from calculator.calculator import Calculator
from calculator.operators import STANDARD_OPERATORS, Operator
from calculator.operators import STANDARD_OPERATORS
@pytest.fixture(scope="module", name="setup")
......@@ -49,10 +49,11 @@ def test_evaluation(setup):
"""
Test the evaluation.
"""
plus, minus, times, divide, calc = setup
_, _, _, _, calc = setup
assert calc("1 + 2") == 3
assert calc("2 * 2") == 4
assert calc('4 / 2') == 2
assert calc("5 - 3") == 2
# À toi de tester la fonction __call__ de Calculator.
# Essaie de tester tous les opérateurs.
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment