-
-
Notifications
You must be signed in to change notification settings - Fork 28
/
tox.ini
113 lines (103 loc) · 2.9 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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
# rdiffweb, A web interface to rdiff-backup repositories
# Copyright (C) 2012-2023 rdiffweb contributors
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
[tox]
envlist = py3,doc,flake8,black,isort,djlint,bullseye,bookworm,sqlalchemy2
[testenv]
passenv = RDIFFWEB_TEST_DATABASE_URI
deps=
pytest
coverage
pytest-cov
psycopg2-binary
#cherrypy<9 depends on nosetest
bullseye: apscheduler==3.7.0
bullseye: argon2-cffi==18.3.0
bullseye: cherrypy==18.6.1
bullseye: configargparse==1.2.3
bullseye: distro==1.5.0
bullseye: humanfriendly==9.1
bullseye: Jinja2==2.11.3
bullseye: ldap3==2.8.1
bullseye: MarkupSafe==1.1.1
bullseye: psutil==5.8.0
bullseye: sqlalchemy==1.3.22
bullseye: tzlocal==2.1
bullseye: WTForms==2.2.1
bookworm: apscheduler==3.9.1
bookworm: argon2-cffi==21.1.0
bookworm: cherrypy==18.8.0
bookworm: configargparse==1.5.3
bookworm: distro==1.8.0
bookworm: humanfriendly==10.0
bookworm: Jinja2==3.1.2
bookworm: ldap3==2.9.1
bookworm: MarkupSafe==2.1.2
bookworm: psutil==5.9.4
bookworm: sqlalchemy==1.4.46
bookworm: tzlocal==4.2
bookworm: WTForms==3.0.1
# Fix version of sqlalchemy2
sqlalchemy2: sqlalchemy>=2,<3
extras = test
commands=
pytest -v --debug --override-ini junit_family=xunit1 --junit-xml=xunit-{envname}.xml --cov=rdiffweb --cov-report xml:coverage-{envname}.xml
[testenv:selenium]
allowlist_externals=
/usr/bin/xvfb-run
extras = test
commands =
xvfb-run pytest -v --debug --ignore=debian
[testenv:doc]
deps =
sphinx
myst-parser
commands = sphinx-build -W -b html -d {envtmpdir}/doctrees doc {envtmpdir}/html
skip_install = true
[testenv:black]
deps = black==22.6.0
commands = black --check --diff setup.py rdiffweb
skip_install = true
[testenv:djlint]
deps = djlint==1.19.2
allowlist_externals = sh
commands = sh -c 'djlint --check rdiffweb/templates/*.html rdiffweb/templates/**/*.html'
skip_install = true
[testenv:flake8]
deps =
flake8==6.0.0
commands = flake8 setup.py rdiffweb
skip_install = true
[testenv:isort]
deps = isort>=5.0.1
commands = isort --check --diff setup.py rdiffweb
skip_install = true
[flake8]
ignore =
# whitespace before ':'
E203
# line too long (86 > 79 characters)
E501
# line break before binary operator
W503
# ambiguous variable name 'I'
E741
filename =
*.py
setup.py
max-complexity = 20
[isort]
profile = black
line_length = 120