Files
bottohelp/pytest.ini
T

70 lines
1.7 KiB
INI

[tool:pytest]
# Конфигурация pytest для телеграм-бота
# Установка минимальной версии Python
minversion = 6.0
# Добавление путей для поиска тестов
testpaths = tests test_handlers
# Паттерны для поиска тестовых файлов
python_files = test_*.py
python_classes = Test*
python_functions = test_*
# Отображение прогресса тестирования
console_output_style = progress
# Показывать локальные переменные при падении тестов
addopts =
--tb=short
--strict-markers
--disable-warnings
--color=yes
-v
pythonpath = .
# Маркеры для категоризации тестов
markers =
unit: Быстрые unit тесты
integration: Интеграционные тесты
slow: Медленные тесты
database: Тесты с базой данных
external: Тесты с внешними сервисами
# Фильтры для запуска определенных типов тестов
filterwarnings =
ignore::DeprecationWarning
ignore::PendingDeprecationWarning
# Настройки покрытия кода
[coverage:run]
source = telegram_bot
omit =
*/tests/*
*/test_*
*/__pycache__/*
*/migrations/*
*/venv/*
[coverage:report]
exclude_lines =
pragma: no cover
def __repr__
if self.debug:
if settings.DEBUG
raise AssertionError
raise NotImplementedError
if 0:
if __name__ == .__main__.:
show_missing = True
skip_covered = False
# HTML отчет о покрытии
[coverage:html]
directory = htmlcov
# XML отчет для CI/CD
[coverage:xml]
output = coverage.xml