def test_first_last_name(self): """ Do names like 'Janis Joplin' work? """ formatted_name = gfn('janis', 'joplin') self.assertEqual(formatted_name, 'Janis Joplin')
def test_first_last_name(self): """Do names like 'Jotaro Kujo' work?""" formatted_name = gfn('jotaro', 'kujo') self.assertEqual(formatted_name, 'Jotaro Kujo')
def test_first_last_middle_name(self): """Do names like 'Giorno Dio Giovanna' work?""" formatted_name = gfn('giorno', 'giovanna', 'dio') self.assertEqual(formatted_name, 'Giorno Dio Giovanna')
from name_function import get_formatted_name as gfn print("Enter 'q' at any time to quit.") while True: first = input("\nPlease give me a first name: ") if first == 'q': break last = input("Please give me a last name: ") if last == 'q': break formatted_name = gfn(first, last) print(f"\tNeatly formatted name: {formatted_name}") input()
def test_name(self): formated_name=gfn("aaa","bbb","ccc") self.assertEqual(formated_name,"Aaa Ccc Bbb")
def test_first_last_middle_name(self): """ Do middle names work? """ formatted_name = gfn('janis', 'japlin', 'joe') self.assertEqual(formatted_name, 'Janis Joe Japlin')