25. 開發工具¶
The modules described in this chapter help you write software. For example, the
pydoc
module takes a module and generates documentation based on the
module’s contents. The doctest
and unittest
modules contains
frameworks for writing unit tests that automatically exercise code and verify
that the expected output is produced. 2to3 can translate Python 2.x
source code into valid Python 3.x code.
The list of modules described in this chapter is:
- 25.1.
pydoc
— Documentation generator and online help system - 25.2.
doctest
— Test interactive Python examples - 25.3.
unittest
— 單元測試框架 - 25.4. 2to3 - 自動將 Python 2的程式碼轉成 Python 3
- 25.5.
test
— Regression tests package for Python - 25.6.
test.support
— Utility functions for tests