From 7401f96ceadb74a3eb1df2b83ada80c3e655f819 Mon Sep 17 00:00:00 2001 From: Pravin Kamble Date: Thu, 5 Feb 2026 12:21:09 +0530 Subject: [PATCH] Use pytest directly in tox and relax version pins --- pyproject.toml | 4 ++-- tox.ini | 6 +----- 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index e9ca8a1b4..1915d9444 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -49,8 +49,8 @@ test = [ "importlib-metadata<5.0", # Pytest for running the tests. - "pytest>=7.0.1,<10", - "pytest-cov>=4.0.0,<8.0", + "pytest==9.*", + "pytest-cov==7.*", "pytest-django>=4.5.2,<5", # Remove when dropping support for Django<5.0 diff --git a/tox.ini b/tox.ini index 5803f62e8..00e5bd57b 100644 --- a/tox.ini +++ b/tox.ini @@ -10,11 +10,7 @@ envlist = docs [testenv] -commands = - python -W error::DeprecationWarning \ - -W "ignore:'cgi' is deprecated:DeprecationWarning" \ - -W error::PendingDeprecationWarning \ - runtests.py --coverage {posargs} +commands = pytest --cov --cov-report xml {posargs} envdir = {toxworkdir}/venvs/{envname} setenv = PYTHONDONTWRITEBYTECODE=1