def test_d1_2_example_4(): lines = ['+7', '+7', '-2', '-7', '-4'] assert d1_2(lines) == 14
def test_d1_2_example_3(): lines = ['-6', '+3', '+8', '+5', '-6'] assert d1_2(lines) == 5
def test_d1_2_example_1(): lines = ['+1', '-1'] assert d1_2(lines) == 0
def test_d1_2_example_2(): lines = ['+3', '+3', '+4', '-2', '-4'] assert d1_2(lines) == 10
def test_d1_2_answer(filedata): assert d1_2(filedata) == 61126