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