alnoda-workspaces/workspaces/python-automate-workspace/examples/simple-script/test_script.py

21 lines
416 B
Python
Raw Normal View History

2021-09-10 09:13:30 +12:00
"""
You can auto-discover and run all tests with this command:
py.test
Documentation: https://docs.pytest.org/en/latest/
"""
2021-09-17 03:49:08 +12:00
from script import calc_result
2021-09-10 09:13:30 +12:00
def test_1():
test_numbers = [1, 1, 1, 1]
expected_result =1
assert calc_result(test_numbers) == expected_result
def test2():
test_numbers = [2, 3, 3, 4]
expected_result = 3
assert calc_result(test_numbers) == expected_result