Пример #1
0
def test_day12_part2():
    assert day12.part2('''<x=-1, y=0, z=2>
<x=2, y=-10, z=-7>
<x=4, y=-8, z=8>
<x=3, y=5, z=-1>''') == 2772
    assert day12.part2('''<x=-8, y=-10, z=0>
<x=5, y=5, z=10>
<x=2, y=-7, z=3>
<x=9, y=-8, z=-3>''') == 4686774924
Пример #2
0
def test_part2(puzzle_input, answer):
    assert part2(puzzle_input) == answer
Пример #3
0
 def test_part2_input(self):
     result = day12.part2(aoc.read_input('day12.input'))
     self.assertEqual(result, 2600000000919)
Пример #4
0
 def test_part2(self):
     self.assertEqual(52742, part2())
Пример #5
0
 def test_part2_example1(self):
     self.assertEqual(day12.part2(self.example_input), 999999999374)
Пример #6
0
def test_part2():
    assert part2() == 200
Пример #7
0
 def test_part2(self):
     self.assertEqual(day12.part2(self.example), 286)
Пример #8
0
 def test_part2_input(self):
     result = day12.part2(aoc.read_input('day12.input'))
     self.assertEqual(380635029877596, result)
Пример #9
0
def test_part2_input(input_data):
    assert part2(input_data) == 106860
Пример #10
0
 def test_part2_example1(self):
     result = day12.part2(self.example_input1)
     self.assertEqual(2772, result)
Пример #11
0
 def test_part2_example2(self):
     result = day12.part2(self.example_input2)
     self.assertEqual(4686774924, result)
Пример #12
0
def test_day12_part2():
    assert day12.part2(day12_example) == 286
Пример #13
0
def test_12_2_examples():
    examples = []
    for (inp, out) in examples:
        assert out == day12.part2(inp)
Пример #14
0
def test_part2(pos, steps):
    p = np.fromstring(pos, dtype=np.int, sep=" ").reshape(4, 3)
    v = np.zeros((4, 3), dtype=np.int)

    assert part2(p, v) == steps
Пример #15
0
def test_part2():
    assert part2(test_input) == 36
Пример #16
0
def test_part2_sample(sample_data):
    assert part2(sample_data) == 286
Пример #17
0
def test_part2_input2():
    assert part2(test_input2) == 103
Пример #18
0
def test_day2():
    assert part2("test1.txt") == 2772