mirror of https://github.com/libp2p/py-libp2p.git
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
18 lines
375 B
18 lines
375 B
6 years ago
|
import pytest
|
||
|
|
||
|
@pytest.mark.parametrize("test_input,expected", [
|
||
|
("3+5", 8),
|
||
|
("2+4", 6),
|
||
|
("6*9", 42),
|
||
|
])
|
||
|
def test_eval(test_input, expected):
|
||
|
assert eval(test_input) == expected
|
||
|
|
||
|
@pytest.mark.parametrize("test_input,expected", [
|
||
|
("3+5", 8),
|
||
|
("2+4", 6),
|
||
|
("6*5", 30),
|
||
|
])
|
||
|
def test_eval2(test_input, expected):
|
||
|
assert eval(test_input) == expected
|