-
Notifications
You must be signed in to change notification settings - Fork 47
/
tox.ini
108 lines (86 loc) · 3.15 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
[tox]
envlist = py
[testenv]
cov_args=--cov=dogpile --cov-append --cov-report term --cov-report xml
setenv=
BASECOMMAND=python -m pytest
{generic}: RUNTESTS=-k 'not test_dbm_backend and not test_memcached_backend and not test_redis_backend'
{memcached}: PIFPAF=pifpaf --env-prefix DOGPILE run memcached --port {env:TOX_DOGPILE_PORT:11234} --
{memcached}: PIFPAF_TLS=pifpaf --env-prefix DOGPILE_TLS run memcached --port {env:TOX_DOGPILE_TLS_PORT:11212} --ssl_chain_cert=tests/tls/server_chain.pem --ssl_key=tests/tls/server.key --
{memcached}: RUNTESTS=tests/cache/test_memcached_backend.py
{redis}: PIFPAF=pifpaf --env-prefix DOGPILE run redis --port {env:TOX_DOGPILE_PORT:11234} --
{redis}: RUNTESTS=tests/cache/test_redis_backend.py
{redis_sentinel}: PIFPAF=pifpaf --env-prefix DOGPILE run redis --port {env:TOX_DOGPILE_PORT:11234} --sentinel --sentinel-port {env:TOX_DOGPILE_SENTINEL_PORT:11235} --
{redis_sentinel}: RUNTESTS=tests/cache/test_redis_sentinel_backend.py
{valkey}: PIFPAF=pifpaf --env-prefix DOGPILE run valkey --port {env:TOX_DOGPILE_PORT:11234} --
{valkey}: RUNTESTS=tests/cache/test_valkey_backend.py
{valkey_sentinel}: PIFPAF=pifpaf --env-prefix DOGPILE run valkey --port {env:TOX_DOGPILE_PORT:11234} --sentinel --sentinel-port {env:TOX_DOGPILE_SENTINEL_PORT:11235} --
{valkey_sentinel}: RUNTESTS=tests/cache/test_valkey_sentinel_backend.py
{dbm}: RUNTESTS=tests/cache/test_dbm_backend.py
{cov}: COVERAGE={[testenv]cov_args}
{full}: FULL=-m ''
extras=
{redis}: pifpaf
{redis_sentinel}: pifpaf
{memcached}: pifpaf
{valkey}: pifpaf
deps=
pytest>=5.4.0
Mako
decorator>=4.0.0
# Needed for an async runner test.
# wait for https://github.com/lericson/pylibmc/issues/288 for py312
{memcached}: pylibmc;python_version<'3.12'
# the py3k python-memcached fails for multiple
# delete
{memcached}: python-memcached
{memcached}: python-binary-memcached>=0.29.0
{memcached}: pymemcache>=3.5.0
{redis}: redis>=3.4.0
{redis_sentinel}: redis>=3.4.0
{valkey}: valkey
{valkey_sentinel}: valkey
{cov}: pytest-cov
commands=
{env:PIFPAF:} {env:PIFPAF_TLS:} {env:BASECOMMAND} {env:COVERAGE:} {env:FULL:} {env:RUNTESTS:} {posargs}
sitepackages=False
usedevelop=True
[testenv:pep484]
basepython = python3
deps=
mypy
types-decorator
types-redis
redis
valkey
Mako
decorator
types-redis
types-decorator
commands = mypy ./dogpile/
[testenv:mypy]
basepython = python3
deps=
{[testenv:pep484]deps}
commands = mypy ./dogpile/
# thanks to https://julien.danjou.info/the-best-flake8-extensions/
[testenv:pep8]
basepython = python3
deps=
flake8==6.1.0
flake8-import-order
flake8-builtins
flake8-future-annotations>=0.0.5
flake8-docstrings>=1.6.0
flake8-import-single==0.1.5
flake8-unused-arguments
flake8-rst-docstrings
# flake8-rst-docstrings dependency, leaving it here
# in case it requires a version pin
pydocstyle
pygments
black==23.12.0
slotscheck>=0.17.0
commands =
flake8 ./dogpile/ ./tests/ setup.py {posargs}
black --check .