def test_city_country_population(self):
     """Does it print city, country - population xxxx"""
     city_country_population = city_info('santiago',
                                         'chile',
                                         population=500000)
     self.assertEqual(city_country_population,
                      "Santiago, Chile - Population 500000")
Exemple #2
0
 def test_city_country(self):
     location_name = city_info('Santiago', 'Chile')
     #print location_name
     self.assertEqual(location_name, 'Santiago Chile')
Exemple #3
0
 def test_city_country_population(self):
     full_info = city_info('Santiago', 'Chile', '500000')
     self.assertEqual(full_info, 'Santiago Chile - population = 500000')
Exemple #4
0
 def test_city_country_population(self) :
     """Testing city = 'Anchorage', country = 'United States, population = 288000"""
     result = city_info('Anchorage','United States', 288000)
     self.assertEqual(result, 'Anchorage, United States - population 288,000')
 def test_info(self):
     """Does city info like Santiago, Chile work?"""
     info = city_info('santiago', 'chile')
     self.assertEqual(info, 'Santiago, Chile')
 def test_info_with_population(self):
     """In the population info added with Santiago, Chile?"""
     info = city_info('santiago', 'chile', 50000)
     self.assertEqual(info, 'Santiago, Chile - 50000')
 def test_city_country(self):
     """"Does it print a city and country?"""
     city_country = city_info('medellin', 'colombia')
     self.assertEqual(city_country, "Medellin, Colombia")
 def test_info(self):
     """Does city info like Santiago, Chile work?"""
     info = city_info('santiago', 'chile')
     self.assertEqual(info, 'Santiago, Chile')
 def test_info_with_population(self):
     """In the population info added with Santiago, Chile?"""
     info = city_info('santiago', 'chile', 50000)
     self.assertEqual(info, 'Santiago, Chile - 50000')
Exemple #10
0
 def test_city_country_population(self):  #记住括号里的self
     """能够正确处理像Wuhan, China - population 10000000这样的信息吗"""
     city_info2 = city_info('wuhan', 'china', 10000000)
     self.assertEqual(city_info2, 'Wuhan, China - population 10000000')
Exemple #11
0
 def test_city_country(self):  #记住括号里的self
     """能够正确的处理像Wuhan, China这样的城市名吗?"""
     '''neat_name = city_neatname('wuhan', 'china')
     self.assertEqual(neat_name, 'Wuhan, China')'''
     city_info1 = city_info('santigo', 'chile')