Exemplo n.º 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()
Exemplo n.º 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)
Exemplo n.º 3
0
 def test_bogus_airport_code(self):
     with self.assertRaises(ValueError):
         _find_station_line('fjaksdlf', self.data)
Exemplo n.º 4
0
 def test_cvg_uppercase_airport_code(self):
     station_line = _find_station_line('CVG', self.data)
     self.assertIn('CVG', station_line)
Exemplo n.º 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)
Exemplo n.º 6
0
	def test_bogus_airport_code(self):
		with self.assertRaises(ValueError):
			_find_station_line('fjaksdlf', self.data)
Exemplo n.º 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)
Exemplo n.º 8
0
	def test_cvg_uppercase_airport_code(self):
		station_line = _find_station_line('CVG', self.data)
		self.assertIn('CVG', station_line)