コード例 #1
0
ファイル: test.py プロジェクト: WardenGnaw/AdventOfCode
    def test_part2(self):
        dir_path = os.path.dirname(os.path.realpath(__file__))
        data = []
        with open(os.path.join(dir_path, 'inputs', 'test_input'), 'r') as f:
            for line in f:
                data.append(int(line.strip()))

        self.assertEqual(main.Part2(data), 241861950)
コード例 #2
0
ファイル: test.py プロジェクト: WardenGnaw/AdventOfCode
    def test_part2_invalid(self):
        dir_path = os.path.dirname(os.path.realpath(__file__))
        file_path = os.path.join(dir_path, 'inputs', 'invalid')

        self.assertEqual(main.Part2(file_path), 0)
コード例 #3
0
    def test_part2(self):
        dir_path = os.path.dirname(os.path.realpath(__file__))
        filename = os.path.join(dir_path, 'inputs', 'test_input')

        self.assertEqual(main.Part2(filename), 336)