tox.ini
[tox]
# See https://docs.djangoproject.com/en/5.0/faq/install/#what-python-version-can-i-use-with-django
# EOL: https://endoflife.date/django
envlist =
py{38,39}-dj22-drf{311,313}
py{38,39,310}-dj32-drf{314}
py{38,39,310,311,312}-dj42-drf{314}
py{310,311,312}-dj50-drf{314}
[pytest]
norecursedirs = examples
[flake8]
ignore = F403 F405 E731
max-line-length = 120
[testenv]
download = true
constrain_package_deps = true
use_frozen_constraints = false
deps =
-rrequirements/dev.txt
dj22: Django~=2.2.1
dj22: pytest-django~=4.5.2
dj32: Django~=3.2.0
dj32: pytest-django~=4.5.2
dj42: Django~=4.2.9
dj42: pytest-django~=4.5.2
dj50: Django~=5.0.1
dj50: pytest-django~=4.5.2
drf311: djangorestframework~=3.11.2
drf313: djangorestframework~=3.13.1
drf314: djangorestframework~=3.14.0
commands =
pytest django_mock_queries/ tests/ --cov-report term-missing --cov=django_mock_queries
python -c "import subprocess; subprocess.check_call(['./manage.py', 'test', '--settings=users.settings_mocked'], cwd='examples/users')"
python -c "import subprocess; subprocess.check_call(['./manage.py', 'test'], cwd='examples/users')"
python -c "import subprocess; subprocess.check_call(['pytest', '--ds=users.settings_mocked'], cwd='examples/users')"
python -c "import subprocess; subprocess.check_call(['pytest'], cwd='examples/users')"
flake8 django_mock_queries/ tests/