2018-10-21 14:05:39 -04:00
|
|
|
import pytest
|
|
|
|
|
2018-11-26 18:24:29 -05:00
|
|
|
# pylint: disable=eval-used
|
|
|
|
|
2019-07-31 15:00:12 -07:00
|
|
|
|
|
|
|
@pytest.mark.parametrize("test_input,expected", [("3+5", 8), ("2+4", 6), ("6*9", 54)])
|
2018-10-21 14:05:39 -04:00
|
|
|
def test_eval(test_input, expected):
|
|
|
|
assert eval(test_input) == expected
|
|
|
|
|
2019-07-31 15:00:12 -07:00
|
|
|
|
|
|
|
@pytest.mark.parametrize("test_input,expected", [("3+5", 8), ("2+4", 6), ("6*5", 30)])
|
2018-10-21 14:05:39 -04:00
|
|
|
def test_eval2(test_input, expected):
|
|
|
|
assert eval(test_input) == expected
|