def test_day06_part1(): assert day06.part1('''COM)B B)C C)D D)E E)F B)G G)H D)I E)J J)K K)L'''.split()) == 42 assert day06.part1(open('input06.txt')) == 171213
def test_part1(): solar_system = [ 'COM)B', 'B)C', 'C)D', 'D)E', 'E)F', 'B)G', 'G)H', 'D)I', 'E)J', 'J)K', 'K)L' ] answer = 42 assert day06.part1(solar_system) == answer
def test_part1_alternate_ordering(): solar_system = [ 'K)L', 'J)K', 'E)J', 'D)I', 'G)H', 'B)G', 'E)F', 'D)E', 'C)D', 'B)C', 'COM)B' ] answer = 42 assert day06.part1(solar_system) == answer
def test_part1_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", ] result = day06.part1(input_list) self.assertEqual(42, result)
def test_part1_sample(sample_data): assert part1(sample_data) == 11
def test_part1(tree, combined_depths): d = parse_tree(tree.split()) combined_depths == part1(d["E"].root)
def test_part1(puzzle_input, answer): assert part1(puzzle_input) == answer
def test_part1(): assert day06.part1('input_day06.txt') == 241064
def test_part1_input(self): result = day06.part1(aoc.read_input('day06.input')) self.assertEqual(273985, result)
def test_day06_part1(): assert day06.part1(day06_example) == 11
def test_part1_on_example_data(self): input = read_inputfile("example06.txt") self.assertEqual(day06.part1(input), 11)
def test_6_1_examples(): examples = [] for (inp, out) in examples: assert out == day06.part1(inp)
def test_part1_example1(self): result = day06.part1(self.example) self.assertEqual(result, 17)
def test_part1(): assert part1("day06/day06.dat") == 3449