示例#1
0
def test_day09_part1():
    code = Code(open('input09.txt'))
    assert day09.part1(code) == [3340912345]
示例#2
0
def test_part1(puzzle_input, preamble_len, answer):
    assert part1(puzzle_input, preamble_len) == answer
def test_part1_input(input_data):
    assert part1(input_data) == 556543474
示例#4
0
def test_part1():
    assert part1("day09/day09.dat") == 385_820
示例#5
0
 def test_part1_input(self):
     result = day09.part1(aoc.read_input('day09.input'))
     self.assertEqual(3742852857, result)
示例#6
0
def test_day09_part1():
    assert day09.part1(day09_example, 5) == 127
示例#7
0
 def test_part1_input( self ):
     result = day09.part1( aoc.read_input( 'day09.input' ) )
     self.assertEqual( result, 398242 )
示例#8
0
 def test_part1_example1( self ):
     result = day09.part1( ( self.example[0], ) )
     self.assertEqual( result, self.example[1] )
def test_9_1_examples():
    examples = []
    for (inp, out) in examples:
        assert out == day09.part1(inp)
示例#10
0
 def test_part1(self):
     file_data = parse("../../07/input.txt")
     [max_val, max_seq] = part1(file_data)
     self.assertEqual(max_val, 13848)