def test_process(self): ans = part1.process(self.test_data, preamble_size=5) self.assertEqual(ans, 127)
def test_process(): assert process("input-test1.csv") == 6.0, "Invalid value for test1, should be 6" assert process("input-test2.csv") == 159.0, "Invalid value for test2, should be 159" assert process("input-test3.csv") == 135.0, "Invalid value for test3, should be 135" print("Passed!")
def test_process(self): ans1 = part1.process(self.test_data_1) ans2 = part1.process(self.test_data_2) self.assertEqual(ans1, 35) self.assertEqual(ans2, 220)
def test_process(self): ans = code.process(self.test_data) self.assertEqual(ans, 37)