Beispiel #1
0
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
Beispiel #2
0
 def test_part1(self):
     self.data = ['F10', 'N3', 'F7', 'R90', 'F11']
     self.assertEqual(25, day12.part1(self.data))
Beispiel #3
0
 def test_rotation(self):
     self.data = ['R180', 'F5']
     self.assertEqual(5, day12.part1(self.data))
Beispiel #4
0
def test_part1(puzzle_input, answer):
    assert part1(puzzle_input) == answer
Beispiel #5
0
 def test_part1_example1(self):
     self.assertEqual(day12.part1(self.example_input), 325)
Beispiel #6
0
 def test_part1_input(self):
     result = day12.part1(aoc.read_input('day12.input'))
     self.assertEqual(result, 3472)
Beispiel #7
0
 def test_part1(self):
     self.assertEqual(day12.part1(self.example), 25)
Beispiel #8
0
def test_part1():
    assert part1() == 306
Beispiel #9
0
def test_part1_input(input_data):
    assert part1(input_data) == 1457
Beispiel #10
0
def test_part1_sample(sample_data):
    assert part1(sample_data) == 25
Beispiel #11
0
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)
Beispiel #13
0
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
Beispiel #14
0
def test_part1():
    assert part1(test_input) == 10
Beispiel #15
0
 def test_part1(self):
     self.assertEqual(1010, part1())
Beispiel #16
0
def test_part1_input2():
    assert part1(test_input2) == 19
Beispiel #17
0
def test_part1():
    assert part1("test1.txt", 10) == 179
    assert part1("test2.txt", 100) == 1940