def test_part1(self): self.assertEqual(1013211, part1())
def test_part1(): assert part1(test_input) == 7
def test_day1_part1(): assert day1.part1(data1) == 1721 * 299 # 514579
#! /usr/bin/python3 import utils import day1 file_input = utils.read_file("./inputs/day1.txt") input = [int(line) for line in file_input] print(day1.part1(input, 2020)) print(day1.part2(input, 2020))
def test_part1_from_problem_def(test_input, expected): # with mock.patch("decorators.open", mock.mock_open(read_data=test_input)) as mock_file: assert part1() == expected
def test_part1(self): expected = 514579 self.assertEqual(part1(self.data, 2020), expected)
def test_part1(): result = part1(total, entries) assert result == 2100
def test_part1(): assert part1() == 3226488
def test_part1(self): exampleInput = [1721, 979, 366, 299, 675, 1456] self.assertEqual(part1(exampleInput), 514579)