def test_day03_part2(): assert day03.part2(['R8,U5,L5,D3', 'U7,R6,D4,L4']) == 30 assert day03.part2([ 'R75,D30,R83,U83,L12,D49,R71,U7,L72', 'U62,R66,U55,R34,D71,R55,D58,R83' ]) == 610 assert day03.part2([ 'R98,U47,R26,D63,R33,U87,L62,D20,R33,U53,R51', 'U98,R91,D20,R16,D67,R40,U7,R15,U6,R7' ]) == 410
def test_part2_example3(self): input_list = [ "R98,U47,R26,D63,R33,U87,L62,D20,R33,U53,R51", "U98,R91,D20,R16,D67,R40,U7,R15,U6,R7" ] result = day03.part2(input_list) self.assertEqual(410, result)
def test_part2_example2(self): input_list = [ "R75,D30,R83,U83,L12,D49,R71,U7,L72", "U62,R66,U55,R34,D71,R55,D58,R83" ] result = day03.part2(input_list) self.assertEqual(610, result)
def test_part2_c(): first_path = [ 'R98', 'U47', 'R26', 'D63', 'R33', 'U87', 'L62', 'D20', 'R33', 'U53', 'R51' ] second_path = [ 'U98', 'R91', 'D20', 'R16', 'D67', 'R40', 'U7', 'R15', 'U6', 'R7' ] answer = 410 assert day03.part2(first_path, second_path) == answer
def test_part2_sample(sample_map): assert part2(sample_map) == 336
def test_part2(): assert part2(289326) == 295229
def test_part2_on_example_data(self): # Predefined trajectory strategies for part two trajectory_strategies = [(1, 1), (3, 1), (5, 1), (7, 1), (1, 2)] self.assertEqual(part2(input1, trajectory_strategies), 336)
def test_part_2_sample(sample_data): assert part2(sample_data) == 230
def test_part2_example1(self): input_list = ["R8,U5,L5,D3", "U7,R6,D4,L4"] result = day03.part2(input_list) self.assertEqual(30, result)
def test_part2(): assert part2("day03/day03.dat") == "124" print(Claim._sq_inches.cache_info()) # pytest -s to see this
def test_part2(c1, c2, result): assert result == part2(c1, c2)
def test_part2_b(): first_path = ['R75', 'D30', 'R83', 'U83', 'L12', 'D49', 'R71', 'U7', 'L72'] second_path = ['U62', 'R66', 'U55', 'R34', 'D71', 'R55', 'D58', 'R83'] answer = 610 assert day03.part2(first_path, second_path) == answer
def test_part2_a(): first_path = ['R8', 'U5', 'L5', 'D3'] second_path = ['U7', 'R6', 'D4', 'L4'] answer = 30 assert day03.part2(first_path, second_path) == answer
def test_part_2(input_data): assert part2(input_data) == 2135254
def test_part2(): assert day03.part2('input_day03.txt') == 20386
def test_part2(): assert part2(TEST) == 230
def test_part2(puzzle_input, answer): assert part2(puzzle_input) == answer
def test_3_2_examples(): examples = [] for (inp, out) in examples: assert out == day03.part2(inp)
def test_day03_part2(): assert day03.part2(day03_testmap) == 336
def test_part2_input(self): result = day03.part2(aoc.read_input('day03.input')) self.assertEqual(27306, result)
def test_part2_example1(self): result = day03.part2(self.example) self.assertEqual(result, 3)