mirror of
https://github.com/encode/django-rest-framework.git
synced 2026-02-10 01:09:38 +03:00
Update pytest versions (#9881)
* Update pytest versions * Ignore deprecation warnings from coreapi * ignore coreapi deprecation warnings during test startup * Use pytest directly in tox and relax version pins
This commit is contained in:
parent
b5455c5daf
commit
64f6580bf3
|
|
@ -49,8 +49,8 @@ test = [
|
||||||
"importlib-metadata<5.0",
|
"importlib-metadata<5.0",
|
||||||
|
|
||||||
# Pytest for running the tests.
|
# Pytest for running the tests.
|
||||||
"pytest>=7.0.1,<8",
|
"pytest==9.*",
|
||||||
"pytest-cov>=4.0.0,<5.0",
|
"pytest-cov==7.*",
|
||||||
"pytest-django>=4.5.2,<5",
|
"pytest-django>=4.5.2,<5",
|
||||||
|
|
||||||
# Remove when dropping support for Django<5.0
|
# Remove when dropping support for Django<5.0
|
||||||
|
|
@ -118,7 +118,10 @@ keep_full_version = true
|
||||||
[tool.pytest.ini_options]
|
[tool.pytest.ini_options]
|
||||||
addopts = "--tb=short --strict-markers -ra"
|
addopts = "--tb=short --strict-markers -ra"
|
||||||
testpaths = [ "tests" ]
|
testpaths = [ "tests" ]
|
||||||
filterwarnings = [ "ignore:CoreAPI compatibility is deprecated*:rest_framework.RemovedInDRF318Warning" ]
|
filterwarnings = [
|
||||||
|
"ignore:CoreAPI compatibility is deprecated*:rest_framework.RemovedInDRF318Warning",
|
||||||
|
"ignore:'cgi' is deprecated:DeprecationWarning",
|
||||||
|
]
|
||||||
|
|
||||||
[tool.coverage.run]
|
[tool.coverage.run]
|
||||||
# NOTE: source is ignored with pytest-cov (but uses the same).
|
# NOTE: source is ignored with pytest-cov (but uses the same).
|
||||||
|
|
|
||||||
2
tox.ini
2
tox.ini
|
|
@ -10,7 +10,7 @@ envlist =
|
||||||
docs
|
docs
|
||||||
|
|
||||||
[testenv]
|
[testenv]
|
||||||
commands = python -W error::DeprecationWarning -W error::PendingDeprecationWarning runtests.py --coverage {posargs}
|
commands = pytest --cov --cov-report xml {posargs}
|
||||||
envdir = {toxworkdir}/venvs/{envname}
|
envdir = {toxworkdir}/venvs/{envname}
|
||||||
setenv =
|
setenv =
|
||||||
PYTHONDONTWRITEBYTECODE=1
|
PYTHONDONTWRITEBYTECODE=1
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user