本文整理匯總了Python中book.Book.get_title方法的典型用法代碼示例。如果您正苦於以下問題:Python Book.get_title方法的具體用法?Python Book.get_title怎麽用?Python Book.get_title使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類book.Book
的用法示例。
在下文中一共展示了Book.get_title方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: correction
# 需要導入模塊: from book import Book [as 別名]
# 或者: from book.Book import get_title [as 別名]
def correction(title, correct_title):
book = Book(title)
self.assertEqual(book.get_title(), correct_title)
示例2: test_capitalize_first_letter
# 需要導入模塊: from book import Book [as 別名]
# 或者: from book.Book import get_title [as 別名]
def test_capitalize_first_letter(self):
book = Book("inferno")
# book.title = "inferno"
self.assertEqual(book.get_title(), "Inferno")
示例3: test_capitalize_every_word
# 需要導入模塊: from book import Book [as 別名]
# 或者: from book.Book import get_title [as 別名]
def test_capitalize_every_word(self):
book = Book("stuart little")
self.assertEqual(book.get_title(), "Stuart Little")