예제 #1
0
 def test_process(self):
     ans = part1.process(self.test_data, preamble_size=5)
     self.assertEqual(ans, 127)
예제 #2
0
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!")
예제 #3
0
 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)
예제 #4
0
 def test_process(self):
     ans = code.process(self.test_data)
     self.assertEqual(ans, 37)