Exemple #1
0
	def test_test_median_tmp(self,):
		day = Day(hourly=[
			{"temp": 274.15,"humidity": 10, "wind_speed" : 1.60934}, 
			{"temp": 275.15,"humidity": 50, "wind_speed" : 3.21868},
			 {"temp": 276.15, "humidity": 100, "wind_speed": 4.82802}
		]) 
		self.assertEquals(day.median_tmp, 2.0) 
Exemple #2
0
	def test_celius_constructor(self,):
		day = Day(hourly=[
			{"temp": 274.15,"humidity": 10, "wind_speed" : 1.60934}, 
			{"temp": 275.15,"humidity": 50, "wind_speed" : 3.21868},
			 {"temp": 276.15, "humidity": 100, "wind_speed": 4.82802}
		])
		self.assertEquals(day.tmps, [1.0,2.0,3.0]) 
		self.assertEquals(day.humids, [10,50,100]) 
		self.assertEquals(day.winds, [1,2,3])