コード例 #1
0
ファイル: test_day02.py プロジェクト: zhatt/adventofcode2018
    def test_part2_example1(self):
        input_list = [
            'abcde', 'fghij', 'klmno', 'pqrst', 'fguij', 'axcye', 'wvxyz'
        ]

        result = day02.part2(input_list)
        self.assertEqual(result, 'fgij')
コード例 #2
0
ファイル: test_day02.py プロジェクト: sguberman/advent2019
def test_part2():
    assert day02.part2('input_day02.txt') == 7749
コード例 #3
0
def test_part2(puzzle_input, answer):
    assert part2(puzzle_input) == answer
コード例 #4
0
ファイル: test_day02.py プロジェクト: olanystrom/adventofcode
def test_part2():
    assert part2(TEST) == 900
コード例 #5
0
ファイル: test_day02.py プロジェクト: zhatt/adventofcode2018
 def test_part2_input(self):
     result = day02.part2(aoc.read_input('day02.input'))
     self.assertEqual(result, 'qyzphxoiseldjrntfygvdmanu')
コード例 #6
0
def test_part2():
    assert part2("day02/day02.dat") == "fvstwblgqkhpuixdrnevmaycd"
コード例 #7
0
 def test_regressions(self):
     self.assertEqual(3058646, part1())
     self.assertEqual(8976, part2())
コード例 #8
0
def test_2_2_examples():
    examples = []
    for (inp, out) in examples:
        assert out == day02.part2(inp)
コード例 #9
0
ファイル: test_cases.py プロジェクト: barnybug/aoc2020
def test_day02_part2():
    assert day02.part2(['1-3 a: abcde', '1-3 b: cdefg',
                        '2-9 c: ccccccccc']) == 1
コード例 #10
0
def test_part_2(input_data):
    assert part2(input_data) == 2134882034
コード例 #11
0
def test_part2_sample():
    assert part2(['1-3 a: abcde\n', '1-3 b: cdefg\n',
                  '2-9 c: ccccccccc\n']) == 1
コード例 #12
0
def test_part2_sample_3():
    assert part2(['2-9 c: ccccccccc']) == 0
コード例 #13
0
def test_part2_sample_2():
    assert part2(['1-3 b: cdefg']) == 0
コード例 #14
0
def test_part2_sample_1():
    assert part2(['1-3 a: abcde']) == 1