開發工具¶
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:
typing
--- 支援型別提示pydoc
--- 文件產生器與線上幫助系統- Python 開發模式
doctest
--- 測試互動式 Python 範例unittest
--- 單元測試框架unittest.mock
— mock 物件函式庫unittest.mock
--- 入門指南- 2to3 --- 自動將 Python 2的程式碼轉成 Python 3
test
--- Python 的回歸測試 (regression tests) 套件test.support
--- Python 測試套件的工具test.support.socket_helper
--- 用於 socket 測試的工具test.support.script_helper
--- 用於 Python 執行測試的工具test.support.bytecode_helper
--- 用於測試位元組碼能正確產生的支援工具test.support.threading_helper
--- Utilities for threading teststest.support.os_helper
--- 用於 os 測試的工具test.support.import_helper
--- 用於 import 測試的工具test.support.warnings_helper
--- 用於 warnings 測試的工具