# Prac 4 - some_pears tests
import pytest

import prac4

test_cases = [
    ([2, 6], [2, 8, 6]),
    ([2, 2, 2], [2, 4, 4, 2]),

    ([1, 3], [1, 4, 3]),
    ([0, 0], [0, 0, 0]),
    ([-1, 1], [-1, 0, 1]),

    ([1, 2, 3], [1, 3, 5, 3]),
    ([5, -2, 4], [5, 3, 2, 4]),

    ([1, 1, 1, 1], [1, 2, 2, 2, 1]),
    ([10, 20, 30, 40], [10, 30, 50, 70, 40]),

    ([1, 2, 3, 4, 5], [1, 3, 5, 7, 9, 5]),
    
    ([1, 7, 21, 35, 35, 21, 7, 1], [1, 8, 28, 56, 70, 56, 28, 8, 1]),

    ([5], [5, 5]),
]

@pytest.mark.parametrize("arg, expected", test_cases)
def test_some_pears(arg, expected):
    assert prac4.some_pears(arg) == expected

if __name__ == "__main__":
    pytest.main(["some_pears_test.py", "-vv",  "-p", "no:faulthandler"])



