forked from oVirt/ovirt-imageio
-
Notifications
You must be signed in to change notification settings - Fork 0
/
tox.ini
68 lines (60 loc) · 1.65 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
# SPDX-FileCopyrightText: Red Hat, Inc.
# SPDX-License-Identifier: GPL-2.0-or-later
#
# 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.
[tox]
envlist = reuse,flake8,test-{py36,py39,py310,py311},bench-{py36,py39,py310,py311}
skip_missing_interpreters = True
whitelist_externals =
ip
[testenv]
passenv = *
usedevelop = True
deps =
test,bench: pytest
test,bench: userstorage>=0.5.1
test: pytest-cov
test: pytest-timeout
commands_pre =
# Build ioutil for current python (e.g. 3.8)
python setup.py build_ext --build-lib .
python -c 'from test import testutil; print("ipv6 supported: %s" % testutil.ipv6_enabled())'
commands =
test: pytest -m 'not benchmark' --cov=ovirt_imageio --durations=10 {posargs}
bench: pytest -m 'benchmark' -vs {posargs}
[testenv:reuse]
deps =
reuse
commands =
reuse lint
[testenv:flake8]
deps =
flake8==3.9
commands =
flake8
[flake8]
show_source = True
statistics = True
exclude =
# hiden directories like .tox and .local in CI.
.*,
# Generated files.
__pycache__,
build,
dist,
[pytest]
# -r chars: (s)skipped, (x)failed, (X)passed
# --strict: ensure no unregistered markers are used
addopts = -rsxX --basetemp=/var/tmp/imageio-tests --strict
# Registered marks.
# https://docs.pytest.org/en/latest/mark.html
markers =
benchmark
timeout
log_level = debug
log_format = %(asctime)s,%(msecs)03d %(levelname)-7s (%(threadName)s) [%(name)s] %(message)s
timeout = 30
timeout_method = thread