示例#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
示例#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
示例#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)
示例#4
0
def test_part2_sample(sample_data):
    assert part2(sample_data) == 6
示例#5
0
def test_part2(puzzle_input, answer):
    assert part2(puzzle_input) == answer
示例#6
0
def test_part2():
    assert day06.part2('input_day06.txt') == 418
示例#7
0
 def test_part2_input(self):
     result = day06.part2(aoc.read_input('day06.input'))
     self.assertEqual(460, result)
示例#8
0
def test_day06_part2():
    assert day06.part2(day06_example) == 6
示例#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)
示例#11
0
 def test_part2_example1(self):
     result = day06.part2(self.example, 32)
     self.assertEqual(result, 16)
示例#12
0
def test_part2():
    assert part2("day06/day06.dat") == 44868