コード例 #1
0
ファイル: test_cases.py プロジェクト: barnybug/aoc2019
def test_day09_part1():
    code = Code(open('input09.txt'))
    assert day09.part1(code) == [3340912345]
コード例 #2
0
ファイル: test_day09.py プロジェクト: sguberman/advent2020
def test_part1(puzzle_input, preamble_len, answer):
    assert part1(puzzle_input, preamble_len) == answer
コード例 #3
0
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
ファイル: test_cases.py プロジェクト: barnybug/aoc2020
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] )
コード例 #9
0
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)