def test_part1_input(self): result = day08.part1(aoc.read_input('day08.input')) self.assertEqual(result, 41926)
def test_day08_part1(): assert day08.part1('123456789012', (3, 2)) == 1
def test_part1_example1(self): result = day08.part1(self.example) self.assertEqual(result, 138)
def test_part1_sample(sample_data): assert part1(sample_data) == 5
def test_part1_input(input_data): assert part1(input_data) == 1818
def test_part1(): assert part1("day08/day08_short.dat") == 138 assert part1("day08/day08.dat") == 43996
def test_part1_on_example_data(self): input = read_inputfile("example08.txt") self.assertEqual(day08.part1(input), 5)
def test_part1(puzzle_input, answer): assert part1(puzzle_input) == answer
def test_part1(self, sample_part1): input_text, expected = sample_part1 assert part1(input_text) == expected
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)
def test_part1(): with open("day08_input.txt") as f: array = np.fromiter(f.readline().rstrip(), dtype=np.int) assert part1(array) == 1206