Esempio n. 1
0
    def test_part2_input(self):
        result = day11.part2(aoc.read_input('day11.input'))

        # Our ship's identifier is AGALRGJE
        expected = \
            "  **   **   **  *    ***   **    ** ****   \n" \
            " *  * *  * *  * *    *  * *  *    * *      \n" \
            " *  * *    *  * *    *  * *       * ***    \n" \
            " **** * ** **** *    ***  * **    * *      \n" \
            " *  * *  * *  * *    * *  *  * *  * *      \n" \
            " *  *  *** *  * **** *  *  ***  **  ****   \n"

        self.assertEqual(expected, result)
Esempio n. 2
0
def test_part2(puzzle_input, answer):
    assert part2(puzzle_input) == answer
Esempio n. 3
0
 def test_part2(self):
     self.assertEqual(1995, part2())
Esempio n. 4
0
def test_day11_part2():
    assert day11.part2(day11_example) == 26
Esempio n. 5
0
 def test_part2_on_example_data(self):
     input = read_inputfile("example11a.txt")
     self.assertEqual(part2(input), 26)
def test_11_2_examples():
    examples = []
    for (inp, out) in examples:
        assert out == day11.part2(inp)
Esempio n. 7
0
def test_part2():
    d = day11.part2(GRID_SERIAL_NUM)
    assert d.total == 124
    assert d.x == 90
    assert d.y == 244
    assert d.grid_size == 16
Esempio n. 8
0
 def test_part2_example(self):
     self.assertEqual(
         26,
         day11.part2(test_seats)
     )
Esempio n. 9
0
 def test_part2(self):
     with open("../inputs/day11.txt") as day11_file:
         self.assertEqual(
             1862,
             day11.part2(day11_file.read())
         )
Esempio n. 10
0
def test_part2():
    assert part2(test_input) == 195
Esempio n. 11
0
 def test_part2_input( self ):
     result = day11.part2( aoc.read_input( 'day11.input' ) )
     self.assertEqual( result, '235,206,13' )
Esempio n. 12
0
 def test_part2_example1( self ):
     self.assertEqual( day11.part2( [ 18 ] ), '90,269,16' )
     self.assertEqual( day11.part2( [ 42 ] ), '232,251,12' )
Esempio n. 13
0
def test_part2_sample(sample_data):
    assert part2(sample_data) == 26
Esempio n. 14
0
def test_part2_input(input_data):
    assert part2(input_data) == 2039