コード例 #1
0
ファイル: test_day14.py プロジェクト: eruvanos/2020_AOC
def test_part_1(file: Path, expected):
    if expected is None:
        return
    lines = file.read_text().splitlines()

    result = solution.part_1(solution.parse(lines))
    assert result == expected
コード例 #2
0
def test_part_1():
    entries = [
        1721,
        979,
        366,
        299,
        675,
        1456,
    ]

    assert part_1(entries) == 514579
コード例 #3
0
def test_part_1():
    m = machine.Machine.from_file("test_input.txt")

    assert solution.part_1(m) == 5
コード例 #4
0
def test_part_1(file: Path, expected):
    print()
    lines = file.read_text().splitlines()

    result = solution.part_1(solution.parse(lines))
    assert result == expected
コード例 #5
0
def test_part_1(password_list):
    assert part_1(password_list) == 2
コード例 #6
0
ファイル: test_solution.py プロジェクト: eruvanos/aocpy
def test_part_1(data, expect):
    assert solution.part_1(data) == expect