Beispiel #1
0
def test_part2():
    solar_system = [
        'COM)B', 'B)C', 'C)D', 'D)E', 'E)F', 'B)G', 'G)H', 'D)I', 'E)J', 'J)K',
        'K)L', 'K)YOU', 'I)SAN'
    ]
    answer = 4
    assert day06.part2(solar_system) == answer
Beispiel #2
0
def test_day06_part2():
    assert day06.part2('''COM)B
B)C
C)D
D)E
E)F
B)G
G)H
D)I
E)J
J)K
K)L
K)YOU
I)SAN'''.split()) == 4
Beispiel #3
0
    def test_part2_example(self):
        input_list = [
            "COM)B",
            "B)C",
            "C)D",
            "D)E",
            "E)F",
            "B)G",
            "G)H",
            "D)I",
            "E)J",
            "J)K",
            "K)L",
            "K)YOU",
            "I)SAN",
        ]

        result = day06.part2(input_list)
        self.assertEqual(4, result)
Beispiel #4
0
def test_part2_sample(sample_data):
    assert part2(sample_data) == 6
Beispiel #5
0
def test_part2(puzzle_input, answer):
    assert part2(puzzle_input) == answer
Beispiel #6
0
def test_part2():
    assert day06.part2('input_day06.txt') == 418
Beispiel #7
0
 def test_part2_input(self):
     result = day06.part2(aoc.read_input('day06.input'))
     self.assertEqual(460, result)
Beispiel #8
0
def test_day06_part2():
    assert day06.part2(day06_example) == 6
Beispiel #9
0
 def test_part2(self):
     input = read_inputfile("example06.txt")
     self.assertEqual(day06.part2(input), 6)
def test_6_2_examples():
    examples = []
    for (inp, out) in examples:
        assert out == day06.part2(inp)
Beispiel #11
0
 def test_part2_example1(self):
     result = day06.part2(self.example, 32)
     self.assertEqual(result, 16)
Beispiel #12
0
def test_part2():
    assert part2("day06/day06.dat") == 44868