development.md
1> **Источник:** https://python-all.ru/2.7/library/development.html2>3> «Документация Python на русском» – неофициальный перевод официальной документации Python: версии от 2.6 до 3.16, полнотекстовый поиск, английский оригинал рядом с переводом. Эта Markdown-версия страницы предназначена для работы с LLM: вставьте её в ChatGPT, Claude или Cursor.45---67# 25. Средства разработки89Модули, описанные в этой главе, помогают писать программное обеспечение. Например, модуль [`pydoc`](https://python-all.ru/2.7/library/pydoc.html#module-pydoc) принимает модуль и генерирует документацию на основе его содержимого. Модули [`doctest`](https://python-all.ru/2.7/library/doctest.html#module-doctest) и [`unittest`](https://python-all.ru/2.7/library/unittest.html#module-unittest) содержат фреймворки для написания модульных тестов, которые автоматически выполняют код и проверяют, что вывод соответствует ожидаемому. **2to3** может переводить исходный код Python 2.x в корректный код Python 3.x.1011Список модулей, описанных в этой главе:1213- [25.1. `pydoc` – генератор документации и справочная система](https://python-all.ru/2.7/library/pydoc.html)14- [25.2. `doctest` – тестирование интерактивных примеров Python](https://python-all.ru/2.7/library/doctest.html)1516 - [25.2.1. Простое использование: проверка примеров в docstrings](https://python-all.ru/2.7/library/doctest.html#simple-usage-checking-examples-in-docstrings)17 - [25.2.2. Простое использование: проверка примеров в текстовом файле](https://python-all.ru/2.7/library/doctest.html#simple-usage-checking-examples-in-a-text-file)18 - [25.2.3. Как это работает](https://python-all.ru/2.7/library/doctest.html#how-it-works)1920 - [25.2.3.1. Какие docstrings проверяются?](https://python-all.ru/2.7/library/doctest.html#which-docstrings-are-examined)21 - [25.2.3.2. Как распознаются примеры в строках документации?](https://python-all.ru/2.7/library/doctest.html#how-are-docstring-examples-recognized)22 - [25.2.3.3. Каков контекст выполнения?](https://python-all.ru/2.7/library/doctest.html#what-s-the-execution-context)23 - [25.2.3.4. А что насчёт исключений?](https://python-all.ru/2.7/library/doctest.html#what-about-exceptions)24 - [25.2.3.5. Флаги параметров](https://python-all.ru/2.7/library/doctest.html#option-flags)25 - [25.2.3.6. Директивы](https://python-all.ru/2.7/library/doctest.html#directives)26 - [25.2.3.7. Предупреждения](https://python-all.ru/2.7/library/doctest.html#warnings)27 - [25.2.4. Базовый API](https://python-all.ru/2.7/library/doctest.html#basic-api)28 - [25.2.5. API модуля unittest](https://python-all.ru/2.7/library/doctest.html#unittest-api)29 - [25.2.6. Продвинутый API](https://python-all.ru/2.7/library/doctest.html#advanced-api)3031 - [25.2.6.1. Объекты DocTest](https://python-all.ru/2.7/library/doctest.html#doctest-objects)32 - [25.2.6.2. Объекты Example](https://python-all.ru/2.7/library/doctest.html#example-objects)33 - [25.2.6.3. Объекты DocTestFinder](https://python-all.ru/2.7/library/doctest.html#doctestfinder-objects)34 - [25.2.6.4. Объекты DocTestParser](https://python-all.ru/2.7/library/doctest.html#doctestparser-objects)35 - [25.2.6.5. Объекты DocTestRunner](https://python-all.ru/2.7/library/doctest.html#doctestrunner-objects)36 - [25.2.6.6. Объекты OutputChecker](https://python-all.ru/2.7/library/doctest.html#outputchecker-objects)37 - [25.2.7. Отладка](https://python-all.ru/2.7/library/doctest.html#debugging)38 - [25.2.8. Разное](https://python-all.ru/2.7/library/doctest.html#soapbox)39- [25.3. `unittest` – фреймворк для модульного тестирования](https://python-all.ru/2.7/library/unittest.html)4041 - [25.3.1. Простой пример](https://python-all.ru/2.7/library/unittest.html#basic-example)42 - [25.3.2. Интерфейс командной строки](https://python-all.ru/2.7/library/unittest.html#command-line-interface)4344 - [25.3.2.1. Параметры командной строки](https://python-all.ru/2.7/library/unittest.html#command-line-options)45 - [25.3.3. Обнаружение тестов](https://python-all.ru/2.7/library/unittest.html#test-discovery)46 - [25.3.4. Организация тестового кода](https://python-all.ru/2.7/library/unittest.html#organizing-test-code)47 - [25.3.5. Повторное использование старого тестового кода](https://python-all.ru/2.7/library/unittest.html#re-using-old-test-code)48 - [25.3.6. Пропуск тестов и ожидаемые сбои](https://python-all.ru/2.7/library/unittest.html#skipping-tests-and-expected-failures)49 - [25.3.7. Классы и функции](https://python-all.ru/2.7/library/unittest.html#classes-and-functions)5051 - [25.3.7.1. Тестовые примеры](https://python-all.ru/2.7/library/unittest.html#test-cases)5253 - [25.3.7.1.1. Устаревшие псевдонимы](https://python-all.ru/2.7/library/unittest.html#deprecated-aliases)54 - [25.3.7.2. Группировка тестов](https://python-all.ru/2.7/library/unittest.html#grouping-tests)55 - [25.3.7.3. Загрузка и запуск тестов](https://python-all.ru/2.7/library/unittest.html#loading-and-running-tests)5657 - [25.3.7.3.1. Протокол load\_tests](https://python-all.ru/2.7/library/unittest.html#load-tests-protocol)58 - [25.3.8. Фикстуры классов и модулей](https://python-all.ru/2.7/library/unittest.html#class-and-module-fixtures)5960 - [25.3.8.1. setUpClass и tearDownClass](https://python-all.ru/2.7/library/unittest.html#setupclass-and-teardownclass)61 - [25.3.8.2. setUpModule и tearDownModule](https://python-all.ru/2.7/library/unittest.html#setupmodule-and-teardownmodule)62 - [25.3.9. Обработка сигналов](https://python-all.ru/2.7/library/unittest.html#signal-handling)63- [25.4. 2to3 – автоматическое преобразование кода Python 2 в 3](https://python-all.ru/2.7/library/2to3.html)6465 - [25.4.1. Использование 2to3](https://python-all.ru/2.7/library/2to3.html#using-2to3)66 - [25.4.2. Исправители](https://python-all.ru/2.7/library/2to3.html#fixers)67 - [25.4.3. `lib2to3` - библиотека 2to3](https://python-all.ru/2.7/library/2to3.html#module-lib2to3)68- [25.5. `test` – пакет регрессионных тестов для Python](https://python-all.ru/2.7/library/test.html)6970 - [25.5.1. Написание модульных тестов для пакета `test`](https://python-all.ru/2.7/library/test.html#writing-unit-tests-for-the-test-package)71 - [25.5.2. Запуск тестов с помощью интерфейса командной строки](https://python-all.ru/2.7/library/test.html#running-tests-using-the-command-line-interface)72- [25.6. `test.support` – вспомогательные функции для тестов](https://python-all.ru/2.7/library/test.html#module-test.support)73