Example #1
0
def main():
    print("Enter 'q' for any time to quit\n")
    while True:
        first_name = input("Enter first name: ")
        if first_name == "q":
            break
        last_name = input("Enter last name: ")
        if last_name == "q":
            break
        print(get_formated_name(first_name, last_name))
 def test_first_last_middle_name(self):
     """Работают ли такие имена, как 'Wolfgang Amadeus Mozart'?"""
     formatted_name = get_formated_name('wolfgang', 'mozart', 'amadeus')
     self.assertEqual(formatted_name, 'Wolfgang Amadeus Mozart')
	def test_first_last_name(self):
		"""Do names like 'Janis Joplin' work? """
		formatted_name = get_formated_name('janis', 'joplin')
		self.assertEqual(formatted_name, 'Janis Joplin')
from name_function import get_formated_name

print("Enter 'q' at any time to quit.")
while True:
    first = input("\nPlease give me your first name: ")
    if first == 'q':
        break
    second = input("\nPlease give me your second name: ")
    if second == 'q':
        break
    fullname = get_formated_name(first, second)
    print(f"Your full name is {fullname}")
Example #5
0
 def test_first_name(self):
     formatted_name = get_formated_name("hello", "world")
     self.assertEqual(formatted_name, "Hello World")
Example #6
0
 def test_fisrt_last_midle_name(self):
     """Nomes como 'Wolfgang Amadeus Mozart' funcionam?"""
     formatted_name = get_formated_name('Wolfgang', 'mozart', 'aMadeuS')
     self.assertEqual(formatted_name, 'Wolfgang Amadeus Mozart')
Example #7
0
 def test_first_midle_last_name(self):
     formated_name = get_formated_name("luis", "janis", "armstrong")
     self.assertEqual(formated_name, "Luis Janis Armstrong")
Example #8
0
 def test_first_last_name(self):
     formated_name = get_formated_name('mohammed', 'rizwan')
     self.assertEqual(formated_name, "Mohammed Rizwan")
Example #9
0
	def test_first_last_name2(self):
		formatted_name = get_formated_name('james1','wilson12')
		self.assertEqual(formatted_name,'James1 Wilson123')
Example #10
0
 def test_first_last_name(self):
     formated_name = get_formated_name("jenis", "joplin")
     self.assertEqual(formated_name, "Jenis Joplin")
 def test_first_last_name(self):
     """Do names like 'Janis joplin' works? """
     formatted_name = get_formated_name('Janis', 'Joplin', 'Awdas')
     self.assertEqual(formatted_name, 'Janis Joplin Awdas')
Example #12
0
from name_function import get_formated_name

while True:
    first_name = input("please input the first_name:")
    if first_name == 'q':
        break
    last_name = input("please input the last_name:")
    print(get_formated_name(first_name, last_name))
Example #13
0
 def test_first_last_name(self):
     """Nomes como 'Janis Joplin' funcionam?"""
     formatted_name = get_formated_name('janis', 'joplin')
     self.assertEqual(formatted_name, 'Janis Joplin')
 def test_first_last_name(self):
     """Имена вида 'Jenis Joplin' работают, правильно!"""
     formatted_name = get_formated_name('jenis', 'joplin')
     self.assertEqual(
         formatted_name,
         'Jenis Joplin')  # Проверяет полученный результат с ожидающим
 def test_first_last_name(self):
     """能够正确地处理像Janis Joplin这样的姓名吗?"""
     formatted_name = get_formated_name('janis', 'joplin')
     self.assertEqual(formatted_name, 'Janis Joplin')
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
-------------------------------------------------
   File Name:     names
   Description :
   Author :       william
   date:          2018/9/19
-------------------------------------------------
   Change Activity:
                   2018/9/19:
-------------------------------------------------
"""
__author__ = 'william'

from name_function import get_formated_name

print("Enter 'q' at any time to quit.")
while True:
    first = input("\nPlease give me a first name: ")
    if first == 'q':
        break
    last = input("\nPlease give me a last name: ")
    if last == 'q':
        break

    formatted_name = get_formated_name(first, last)
    print("\tNeatly formatted name: " + formatted_name + ".")

 def test_first_last_middle(self):
     """测试3部分名字"""
     format_name = get_formated_name('wang', 'qing', 'guo')
     self.assertEqual(format_name, 'Wang Guo Qing')
Example #18
0
 def test_first_middle_last(self):
     formated_name = get_formated_name(first='mohammed',
                                       middle='rizwan',
                                       last='Amanullah')
     self.assertEquals(formated_name, "Mohammed Rizwan Amanullah")
	def test_first_last_middle_name(self):
		""" Do names like ' Wolfgang Amadeus Mozart' work? """
		formatted_name = get_formated_name('wolfgang', 'mozart', 'amadeus')
		self.assertEqual(formatted_name, 'Wolfgang Amadeus Mozart')
Example #20
0
 def test_first_middle_last_name(self):
     name = get_formated_name("hello", "greate", "python")
     self.assertEqual(name, "Hello Greate Python")
 def test_first_last_name(self):
     formated_name = get_formated_name('james', 'jack')
     self.assertEqual(formated_name, 'James Jack')