Exemplo n.º 1
0
    def test_first_last_name(self):
        """Do names like 'Janis Joplin' work?"""
        print('a')
        formatted_name = get_formatted_name('janis', 'joplin')
        self.assertEqual(formatted_name, 'Janis Joplin')

        def test_first_last_middle_name(self):
            """Do names like 'Wolfgang Amadeus Mozart' work?"""

        formatted_name = get_formatted_name('wolfgang', 'mozart', 'amadeus')
        self.assertEqual(formatted_name, 'Wolfgang Amadeus Mozart')
Exemplo n.º 2
0
 def test_first_last_name(self):
     """checking if names like Nathaniel Nat works"""
     formatted_name = get_formatted_name('abena', 'yao')
     self.assertEqual(formatted_name, 'Abena Yao')
Exemplo n.º 3
0
 def test_first_last_middle_name(self):
     """ checking if names like Nathaniel yaw Nat"""
     formatted_name = get_formatted_name('abena', 'yao', 'elorm')
     self.assertEqual(formatted_name, 'Abena Elorm Yao')
Exemplo n.º 4
0
from name_func import get_formatted_name

print("Enter 'q' to quit")

while True:
    first = input('Enter your first name: ')
    if first == 'q':
        break
    last = input('Enter your Last Name: ')
    if last == 'q':
        break
    formatted_name = get_formatted_name(first, last)
    print(f'Well formatted name: {formatted_name}')
Exemplo n.º 5
0
from name_func import get_formatted_name

print("Нажмите 'q' чтобы выйти из программы...")
while True:
    f_name = input("\nPlease give me a first name: ")
    if f_name == 'q':
        break
    l_name = input("Please give me a last name: ")
    if l_name == 'q':
        break

    formatted_name = get_formatted_name(f_name, l_name)
    print("\tNeatly formatted name: " + formatted_name + '.')
 def test_first_last_name(self):
     """Do names like 'Janis Joplin' work?"""
     formatted_name = get_formatted_name('janis', 'joplin')
     self.assertEqual(formatted_name, 'Janis Joplin')
 def test_first_last_middle_name(self):
     """Do names like 'Wolfgang Amadeus Mozart' work?"""
     formatted_name = get_formatted_name('wolfgang', 'mozart', 'amadeus')
     self.assertEqual(formatted_name, 'Wolfgang Amadeus Mozart')
Exemplo n.º 8
0
 def test_first_last_name(self):
     '''Do names like 'Jane Jacobs' work?'''
     formatted_name = get_formatted_name('jane', 'jacobs')
     self.assertEqual(formatted_name, 'Jane Jacobs')
Exemplo n.º 9
0
 def test_first_last_middle_name(self):
     '''Do names like 'John Fitzgerald Kennedy' work?'''
     formatted_name = get_formatted_name('john', 'kennedy', 'fitzgerald')
     self.assertEqual(formatted_name, 'John Fitzgerald Kennedy')
Exemplo n.º 10
0
 def test_first_last(self):
     formatted_name = get_formatted_name('Jackie','Chan')
     self.assertEqual(formatted_name, 'Jackie Chan')
Exemplo n.º 11
0
 def test_middle_name(self):
     formatted_name = get_formatted_name('oleksiy', 'nikolaenko', 'dimax')
     self.assertEqual(formatted_name, 'Oleksiy Nikolaenko Dimax')
Exemplo n.º 12
0
 def test_first_last_name(self):
     formatted_name = get_formatted_name('oleksiy', 'nikolaenko')
     self.assertEqual(formatted_name, 'Oleksiy Nikolaenko')
Exemplo n.º 13
0
 def test_first_last_name(self):
     ''' handle names like Janis Joplin or not? '''
     formatted_name = get_formatted_name('Janis', 'Joplin')
     self.assertEqual(formatted_name, 'Janis Joplin')
Exemplo n.º 14
0
 def test_first_middle_last_name(self):
     ''' handle names like Wolfgang Amedeus Mozart or not ? '''
     formatted_name = get_formatted_name('Wolfgang', 'mozart', 'amedeus')
     self.assertEqual(formatted_name, 'Wolfgang Amedeus Mozart')