I'm practising with unit test module.
I have this simple code. It is a function that joins strings so that I can get this result: "City, Country"
def city_country(city_name, country_name):
"""Simple code that prints City, Country"""
print(city_name.title() + ", " country_name.title())
When I run it, the function works OK.
I wrote a class to test the code with unit tests, and I got an error.
I noticed that when I assign the function to a variable, like this :
city_country_var = city_country('Punto Fijo', 'Venezuela')
And then import it to the TestClass(or somewhere else), print it, this is the result :
Punto Fijo, Venezuela
None
I don't know how to handle it or why is it caused, since it's the same function that worked fine earlier by itself. But it only gives me that result if I import the function to another file. Can I get some advice about why does it happen and how to solve it?