From c47aeff07dfca77aed0bd3dbfdc85a7fd668b071 Mon Sep 17 00:00:00 2001 From: VolandSZ <{E-MAIL}> Date: Mon, 31 Aug 2026 11:27:54 +0300 Subject: [PATCH] chore: upgrade pytest-html 3.x -> 4.x, fix pytest.ini MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Upgrade pytest-html 3.2.0 to 4.x (совместима с pytest 9.1) - Убрать пин версии pytest-html==3.2.0 в requirements.txt - Перенести --html флаг из ручного запуска в pytest.ini addopts, чтобы отчёт генерировался автоматически при каждом запуске pytest - Убрать html_report_dir из pytest.ini (не поддерживается, вызывал PytestConfigWarning: Unknown config option) - Исправить опечатку в маркере vetstation - Добавить html-report/ и report.html в .gitignore --- .gitignore | 3 +++ pytest.ini | 5 ++--- requirements.txt | 12 ++++++------ 3 files changed, 11 insertions(+), 9 deletions(-) diff --git a/.gitignore b/.gitignore index 36b13f1..788bfee 100644 --- a/.gitignore +++ b/.gitignore @@ -174,3 +174,6 @@ cython_debug/ # PyPI configuration file .pypirc +# Test reports +html-report/ +report.html diff --git a/pytest.ini b/pytest.ini index d84560f..76a5ccf 100644 --- a/pytest.ini +++ b/pytest.ini @@ -1,10 +1,9 @@ [pytest] -addopts = --browser chromium --headed --slowmo 1000 -html_report_dir = html-report +addopts = --browser chromium --headed --slowmo 1000 --html=html-report/report.html --self-contained-html testpaths = tests markers = vetdept: тесты для роли Управление ветеринарии - vetstation: тесты для роли Ветеринарная станци + vetstation: тесты для роли Ветеринарная станция prefecture: тесты для роли Администрация contractor_admin: тесты для роли Администратор организации отлова smoke: критически важные тесты для быстрого прогона \ No newline at end of file diff --git a/requirements.txt b/requirements.txt index a62a99f..9088fc9 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,6 +1,6 @@ -playwright -pytest -pytest-playwright -pytest-xdist -pytest-html==3.2.0 -python-dotenv \ No newline at end of file +playwright +pytest +pytest-playwright +pytest-xdist +pytest-html +python-dotenv \ No newline at end of file