Test- Driven Python Development
暫譯: 測試驅動的 Python 開發
Siddharta Govindaraj
- 出版商: Packt Publishing
- 出版日期: 2015-04-30
- 售價: $2,200
- 貴賓價: 9.5 折 $2,090
- 語言: 英文
- 頁數: 300
- 裝訂: Paperback
- ISBN: 1783987928
- ISBN-13: 9781783987924
-
相關分類:
Python、程式語言
海外代購書籍(需單獨結帳)
相關主題
商品描述
Develop high-quality and maintainable Python applications using the principles of test-driven development
About This Book
- Write robust and easily maintainable code using the principles of test driven development
- Get solutions to real-world problems faced by Python developers
- Go from a unit testing beginner to a master through a series of step-by-step tutorials that are easy to follow
Who This Book Is For
This book is intended for Python developers who want to use the principles of test-driven development (TDD) to create efficient and robust applications. In order to get the best out of this book, you should have development experience with Python.
What You Will Learn
- Implement the test-driven development process in Python applications
- Fully leverage Python's powerful built-in unittest and doctest modules
- Effectively add features to existing code bases that do not have any tests
- Safely resolve problems with the code and design, without breaking any functionality
- Utilize Python's powerful mock and patch functionality to test complex interactions
- Integrate unit testing into the overall software delivery process
- Use doctest to test code with examples
- Enhance TDD with the nose2 test runner
In Detail
This book starts with a look at the test-driven development process, and how it is different from the traditional way of writing code. All the concepts are presented in the context of a real application that is developed in a step-by-step manner over the course of the book. While exploring the common types of smelly code, we will go back into our example project and clean up the smells that we find.
Additionally, we will use mocking to implement the parts of our example project that depend on other systems. Towards the end of the book, we'll take a look at the most common patterns and anti-patterns associated with test-driven development, including integration of test results into the development process.
商品描述(中文翻譯)
使用測試驅動開發原則開發高品質且易於維護的 Python 應用程式
本書介紹
- 使用測試驅動開發原則撰寫穩健且易於維護的程式碼
- 獲得 Python 開發者面臨的現實問題的解決方案
- 透過一系列易於跟隨的逐步教學,從單元測試初學者成為專家
本書適合誰
本書適合希望使用測試驅動開發(TDD)原則來創建高效且穩健應用程式的 Python 開發者。為了充分利用本書,您應該具備 Python 的開發經驗。
您將學到什麼
- 在 Python 應用程式中實施測試驅動開發過程
- 充分利用 Python 強大的內建 unittest 和 doctest 模組
- 有效地為沒有任何測試的現有程式碼庫添加功能
- 安全地解決程式碼和設計中的問題,而不破壞任何功能
- 利用 Python 強大的 mock 和 patch 功能來測試複雜的互動
- 將單元測試整合到整體軟體交付過程中
- 使用 doctest 透過範例測試程式碼
- 使用 nose2 測試執行器增強 TDD
詳細內容
本書首先介紹測試驅動開發過程,以及它與傳統編寫程式碼方式的不同。所有概念都在一個實際應用程式的背景下呈現,該應用程式在本書的過程中以逐步的方式開發。在探索常見的臭味程式碼類型時,我們將回到我們的範例專案,清理我們發現的臭味。
此外,我們將使用模擬來實現我們的範例專案中依賴其他系統的部分。在本書的最後,我們將查看與測試驅動開發相關的最常見模式和反模式,包括將測試結果整合到開發過程中。