Example #1
0
 def test_part1_input(self):
     result = day08.part1(aoc.read_input('day08.input'))
     self.assertEqual(result, 41926)
Example #2
0
def test_day08_part1():
    assert day08.part1('123456789012', (3, 2)) == 1
Example #3
0
 def test_part1_example1(self):
     result = day08.part1(self.example)
     self.assertEqual(result, 138)
Example #4
0
def test_part1_sample(sample_data):
    assert part1(sample_data) == 5
Example #5
0
def test_part1_input(input_data):
    assert part1(input_data) == 1818
Example #6
0
def test_part1():
    assert part1("day08/day08_short.dat") == 138
    assert part1("day08/day08.dat") == 43996
Example #7
0
 def test_part1_on_example_data(self):
     input = read_inputfile("example08.txt")
     self.assertEqual(day08.part1(input), 5)
Example #8
0
def test_part1(puzzle_input, answer):
    assert part1(puzzle_input) == answer
Example #9
0
 def test_part1(self, sample_part1):
     input_text, expected = sample_part1
     assert part1(input_text) == expected
Example #10
0
def test_day08_part1():
    assert day08.part1(day08_example) == 5
def test_8_1_examples():
    examples = []
    for (inp, out) in examples:
        assert out == day08.part1(inp)
Example #12
0
def test_part1():
    with open("day08_input.txt") as f:
        array = np.fromiter(f.readline().rstrip(), dtype=np.int)
    assert part1(array) == 1206