py-libp2p/tests/test_example.py

14 lines
376 B
Python
Raw Normal View History

2018-10-22 02:05:39 +08:00
import pytest
# pylint: disable=eval-used
2019-08-01 06:00:12 +08:00
@pytest.mark.parametrize("test_input,expected", [("3+5", 8), ("2+4", 6), ("6*9", 54)])
2018-10-22 02:05:39 +08:00
def test_eval(test_input, expected):
assert eval(test_input) == expected
2019-08-01 06:00:12 +08:00
@pytest.mark.parametrize("test_input,expected", [("3+5", 8), ("2+4", 6), ("6*5", 30)])
2018-10-22 02:05:39 +08:00
def test_eval2(test_input, expected):
assert eval(test_input) == expected