開發工具¶
本章所描述的模組可以幫助你編寫軟體。例如 pydoc 模組可以根據模組的內容生成文件;doctest 和 unittest 模組則包含編寫單元測試的框架,這些測試程式碼會自動執行並驗證輸出結果是否正確。
本章節所描述的模組列表為:
typing--- 支援型別提示pydoc--- 文件產生器與線上幫助系統- Python 開發模式
doctest--- 測試互動式 Python 範例unittest--- 單元測試框架unittest.mock— mock 物件函式庫unittest.mock--- 入門指南test--- Python 的回歸測試 (regression tests) 套件test.support--- Utilities for the Python test suitetest.support.socket_helper--- Utilities for socket teststest.support.script_helper--- Utilities for the Python execution teststest.support.bytecode_helper--- Support tools for testing correct bytecode generationtest.support.threading_helper--- Utilities for threading teststest.support.os_helper--- Utilities for os teststest.support.import_helper--- Utilities for import teststest.support.warnings_helper--- Utilities for warnings tests