def test_day12_part1(): assert day12.part1( '''<x=-1, y=0, z=2> <x=2, y=-10, z=-7> <x=4, y=-8, z=8> <x=3, y=5, z=-1>''', 10) == 179 assert day12.part1( '''<x=-8, y=-10, z=0> <x=5, y=5, z=10> <x=2, y=-7, z=3> <x=9, y=-8, z=-3>''', 100) == 1940
def test_part1(self): self.data = ['F10', 'N3', 'F7', 'R90', 'F11'] self.assertEqual(25, day12.part1(self.data))
def test_rotation(self): self.data = ['R180', 'F5'] self.assertEqual(5, day12.part1(self.data))
def test_part1(puzzle_input, answer): assert part1(puzzle_input) == answer
def test_part1_example1(self): self.assertEqual(day12.part1(self.example_input), 325)
def test_part1_input(self): result = day12.part1(aoc.read_input('day12.input')) self.assertEqual(result, 3472)
def test_part1(self): self.assertEqual(day12.part1(self.example), 25)
def test_part1(): assert part1() == 306
def test_part1_input(input_data): assert part1(input_data) == 1457
def test_part1_sample(sample_data): assert part1(sample_data) == 25
def test_day12_part1(): assert day12.part1(day12_example) == 25
def test_12_1_examples(): examples = [] for (inp, out) in examples: assert out == day12.part1(inp)
def test_part1(pos, steps, total_energy): p = np.fromstring(pos, dtype=np.int, sep=" ").reshape(4, 3) v = np.zeros((4, 3), dtype=np.int) assert part1(p, v, steps) == total_energy
def test_part1(): assert part1(test_input) == 10
def test_part1(self): self.assertEqual(1010, part1())
def test_part1_input2(): assert part1(test_input2) == 19
def test_part1(): assert part1("test1.txt", 10) == 179 assert part1("test2.txt", 100) == 1940