diff --git a/Chapter_11/README.md b/Chapter_11/README.md new file mode 100644 index 0000000..deed913 --- /dev/null +++ b/Chapter_11/README.md @@ -0,0 +1 @@ +Forgone the naming convention due to conflict with module naming and numbers in the file name. \ No newline at end of file diff --git a/Chapter_11/city_functions.py b/Chapter_11/city_functions.py new file mode 100644 index 0000000..b8bd7fa --- /dev/null +++ b/Chapter_11/city_functions.py @@ -0,0 +1,6 @@ +# Exercise 11-01 City, Country +# Learning Objective: Create a unit test for a function and run it. + +def create_city_string(city, country): + new_string = city.title() + ", " + country.title() + return new_string diff --git a/Chapter_11/test_cities.py b/Chapter_11/test_cities.py new file mode 100644 index 0000000..70b9f3f --- /dev/null +++ b/Chapter_11/test_cities.py @@ -0,0 +1,8 @@ +from city_functions import create_city_string + +def test_city_country(): + output_string = create_city_string("talahasse", "united states") + print(f"{output_string}") + assert output_string == "Talahasse, United States" + +test_city_country() \ No newline at end of file