Skip to content
Snippets Groups Projects
Commit 80fdbbf5 authored by Antoine Lambert's avatar Antoine Lambert
Browse files

tests: Simplify setup after pytest 8.1 release

Since the release of pytest 8.1, some pytest options are no longer
needed and editable install can be used when running tests using tox.
parent daba9d6b
No related branches found
No related tags found
No related merge requests found
[pytest]
addopts = -p no:flask --import-mode=importlib
addopts = -p no:flask
norecursedirs = build docs .*
asyncio_mode = strict
DJANGO_SETTINGS_MODULE = swh.auth.tests.django.app.apptest.settings
consider_namespace_packages = true
django-stubs
djangorestframework-stubs
pytest
pytest >= 8.1
pytest-django
pytest-mock
requests_mock
......
......@@ -7,6 +7,7 @@ envlist =
py3
[testenv]
use_develop = true
extras =
testing
django
......@@ -15,14 +16,10 @@ deps =
pytest-cov
commands =
pytest --doctest-modules \
--rootdir {envsitepackagesdir} \
--cov={envsitepackagesdir}/swh/auth \
--cov=swh/auth \
--cov-branch \
{envsitepackagesdir}/swh/auth \
swh/auth \
{posargs}
# --rootdir (with --import-mode from pytest.ini) are required to make tests
# that depends on the test file to be a proper submodule of the swh namespace
# after migration to PEP420 (implicit namespace).
[testenv:black]
skip_install = true
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment