예제 #1
0
 def test_high_invalid_values(self):
     processor = Processor(self.db)
     result = processor.find_high(None, 360)
     self.assertIsNone(result)
     result = processor.find_high(1999, None)
     self.assertIsNone(result)
     result = processor.find_high(None, None)
     self.assertIsNone(result)
     result = processor.find_high(1978, 400)
     self.assertIsNone(result)
예제 #2
0
 def test_high_temp(self):
     processor = Processor(self.db)
     result = processor.find_high(1999, 360)
     self.assertEqual(result, -45)
     result = processor.find_high(1999, 30)
     self.assertEqual(result, 35)
     result = processor.find_high(1999, 1)
     self.assertEqual(result, 25)
     result = processor.find_high(2000, 365)
     self.assertEqual(result, 12)
예제 #3
0
파일: plot.py 프로젝트: mjwolf/weather
 def _get_highs(self, year, start, end):
     processor = Processor(self.db)
     return [processor.find_high(year, x) for x in range(start, end)]