Exemple #1
0
 def setUp(self):
     with open(os.path.join(BASE_DIR, 'example_data.txt'),
               'r') as data_file:
         self.data = data_file.readlines()
     self.line = _find_station_line('DEN', self.data)
     self.winds = _parse_station_line(self.line)
     self.winds_dict = self.winds.dict()
Exemple #2
0
 def test_cvg_leading_and_trailing_spaces_airport_code(self):
     station_line = _find_station_line('   CVG   ', self.data)
     self.assertIn('CVG', station_line)
Exemple #3
0
 def test_bogus_airport_code(self):
     with self.assertRaises(ValueError):
         _find_station_line('fjaksdlf', self.data)
Exemple #4
0
 def test_cvg_uppercase_airport_code(self):
     station_line = _find_station_line('CVG', self.data)
     self.assertIn('CVG', station_line)
Exemple #5
0
	def setUp(self):
		with open(os.path.join(BASE_DIR, 'example_data.txt'), 'r') as data_file:
			self.data = data_file.readlines()
		self.line = _find_station_line('CVG', self.data)
		self.winds = _parse_station_line(self.line)
Exemple #6
0
	def test_bogus_airport_code(self):
		with self.assertRaises(ValueError):
			_find_station_line('fjaksdlf', self.data)
Exemple #7
0
	def test_cvg_leading_and_trailing_spaces_airport_code(self):
		station_line = _find_station_line('   CVG   ', self.data)
		self.assertIn('CVG', station_line)
Exemple #8
0
	def test_cvg_uppercase_airport_code(self):
		station_line = _find_station_line('CVG', self.data)
		self.assertIn('CVG', station_line)