-
Notifications
You must be signed in to change notification settings - Fork 17
/
tox.ini
63 lines (55 loc) · 1.69 KB
/
tox.ini
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
# Tox (http://tox.testrun.org/) is a tool for running tests
# in multiple virtualenvs. This configuration file will run the
# test suite on all supported python versions. To use it, "pip install tox"
# and then run "tox" from this directory.
# In order to allow whitespace in envlist install tox version 3 or up:
# Currently `pip install tox==3.0.0rc2`
[tox]
envlist = py38-django{ 32, 40, 41, 42 }
py39-django{ 32, 40, 41, 42 }
py310-django{ 32, 40, 41, 42 }
py311-django{ 41, 42 }
# Shouldn't be any need to run with no DRF for each python
py311-no-rest-framework
type-check
skipsdist = true
[testenv]
passenv = TERM
commands =
pytest --cov={envsitepackagesdir}/bananas --cov=tests \
--cov-report xml \
--cov-report term-missing \
--cov-fail-under=0 \
{posargs}
deps =
.[drf]
pytest
pytest-cov
pytest-django
django-stubs
djangorestframework-stubs
django32: Django<4.0
django40: Django<4.1
django41: Django<4.2
django42: Django<4.3
django32: djangorestframework>=3.12.0,<3.13
django40: djangorestframework>=3.14.0,<3.15
django41: djangorestframework>=3.14.0,<3.15
# TODO: Change to proper version when a version with this commit is available.
django42: https://github.com/encode/django-rest-framework/archive/ea03e95174f46003e7e917b623c5316247b8b316.zip
[testenv:py311-no-rest-framework]
commands =
pytest {posargs}
deps =
.
Django>=2.2,<=4.2
pytest
pytest-cov
pytest-django
[testenv:type-check]
basepython = python3.10
skip_install = true
commands =
mypy
deps =
.[dev]