def test_city_country_population(self): """Does Santiago, Chile - population 5000000 work?""" formatted_sentence = get_city_country('santiago', 'chile', population=5000000) self.assertEqual(formatted_sentence, 'Santiago, Chile - population 5000000')
def test_city_country_population(self): """ Do city, country - population such as 'Santiago, Chile - population 5000000' work? """ formatted_city_country = get_city_country('santiago', 'chile', 5000000) self.assertEqual(formatted_city_country, 'Santiago, Chile - population 5000000')
def test_city_country_population(self): """ Тестирует правильность форматирования названия города, страны и населения. """ formatted_name = get_city_country('Los-Angeles', 'American', population=3000000) self.assertEqual(formatted_name, 'Los-Angeles American-population 3000000.')
def test_city_population(self): city = get_city_country('Santiago', 'Chile', population=5000000) self.assertEqual(city, 'Santiago, Chile - 5000000')
def test_city_country_name(self): """能够正确地处理像Santiago Chile""" formatted_name = get_city_country('santiago', 'chile') self.assertEqual(formatted_name, 'Santiago, Chile')
def test_city_country(self): """Do names like 'Santiago, Chile' work?""" city_country = get_city_country('santiago', 'chile') self.assertEqual(city_country, 'Santiago, Chile')
def test_city_country_population(self): result = get_city_country('santiago', 'chile', 'population=5000000') self.assertEqual(result, 'Santiago, Chile - population 5000000')
def test_city_country_population(self): """测试是否能正确处理加上人口后的信息""" formatted_city = get_city_country('santiago', 'chile', 'population=5000000') self.assertEqual(formatted_city, "Santiago, Chile - Population=5000000")
def test2(self): formatted_city_country = get_city_country('santiago', 'chile', population='5000000') self.assertEqual(formatted_city_country, 'Santiago,Chile - population 5000000!')
def test1(self): formatted_city_country = get_city_country('santiago', 'chile') self.assertEqual(formatted_city_country, 'Santiago,Chile')
def test_city_country(self): city_country = get_city_country('portland', 'united states') self.assertEqual(city_country, "Portland, United States")
def test_city_country_population(self): city_country_population = get_city_country('santiago', 'chile', population=5000000) self.assertEqual(city_country_population, "Santiago, Chile - Population 5000000")
def test_city_country_population(self): """Do city-country-population inputs work?""" city_country = get_city_country('santiago', 'chile', population=5000000) self.assertEqual(city_country, 'Santiago, Chile - population 5000000')
def test_city_country_population(self): city_country = get_city_country('santiago', 'chile', 'population=5000000') self.assertEqual(city_country, 'Santiago, Chile - Population=5000000')
def test_city_country_population(self): """Does city, country and population like 'Santiago, Chile, 5000000' work?""" city_country_population = get_city_country('santiago', 'chile', 5000000) self.assertEqual(city_country_population, 'Santiago, Chile - population 5000000')
def test_city_country(self): """无population的测试""" my_city = get_city_country('beijing', 'china') self.assertEqual(my_city, 'Beijing, China')
def test_city_country_population(self): """Do cities like 'Santiago, Chile' with populations work?""" city_country = get_city_country('santiago', 'chile', 50000000) self.assertEqual(city_country, 'Santiago, Chile - Population: 50000000')
def test_city_contry(self): city_contry = get_city_country('Shanghai', 'China') self.assertEqual(city_contry, 'Shanghai, China')
def test_city_country(self): """Тестирует правильность форматирования названия города и страны.""" formatted_name = get_city_country('Los-Angeles', 'American') self.assertEqual(formatted_name, 'Los-Angeles American.')
def test_city_country(self): city_country = get_city_country('santiago', 'chile') self.assertEqual(city_country, 'Santiago, Chile')
def test_city_country(self): """是否能正确处理像Guangzhou, China这样的城市""" formatted_city = get_city_country('guangzhou', 'china') self.assertEqual(formatted_city, "Guangzhou, China")
def test_city_country(self): city_country = get_city_country("shantou", "china") self.assertEqual(city_country, "Shantou, China")
def test_city_country(self): result = get_city_country('santiago', 'chile') self.assertEqual(result, 'Santiago, Chile')
def test_city_country_population(self): city_country_population = get_city_country("shantou", "china", "5000000") self.assertEqual(city_country_population, "Shantou, China-Population5000000")
from city_functions import get_city_country import unittest print("You can quit at anytime") print("If you wanna quit please enter 'q'") while True: city = input("Please enter your city:") if city == 'q': break country = input("Please enter your country:") if country == 'q': break message = get_city_country(city, country) print(message)
def test_city_country_population(self): population = get_city_country('Kyiv', 'Ukraine', '5000') self.assertEquals(population, 'Kyiv Ukraine 5000')
def test_city_country(self): city = get_city_country('Santiago', 'Chile') self.assertEqual(city, 'Santiago Chile')
def test_city_country(self): city_country = get_city_country('Kyiv', 'Ukraine') self.assertEquals(city_country, 'Kyiv Ukraine')
def test_city_country(self): """Does 'Santiago, Chile ' work?""" city_country = get_city_country('santiago', 'chile', 5000000) self.assertEqual(city_country, 'Santiago, Chile Population = 5000000')
def test_city_country_population(self): """有population的测试""" my_city = get_city_country('beijing', 'china', population=50000000) self.assertEqual(my_city, 'Beijing, China - population 50000000')