forked from herbstluftwm/herbstluftwm
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtox.ini
53 lines (47 loc) · 1.48 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
[tox]
envlist = py38
skipsdist = true
###
# Cheatsheet:
#
# * run a specific test suite: tox -- tests/test_layout.py
# * run a specific single test case: tox -- tests/test_layout.py::test_single_frame_layout
# * run tests matching a substring expression: tox -- _remove_
# * run tests in parallel: tox -- -n auto
#
# Library references:
# * ewmh: https://ewmh.readthedocs.io/en/latest/
###
###
[testenv]
# OBACHT / CAUTION: you need to have xvfb installed (xorg-server-xvfb)
#
# we need to ensure the local dependency (./python) is up to date
# in the virtual env, so we always re-install it before testing. (We do not
# need to do this in testenv:flake8, because that scans the entire git
# repository anyway)
commands =
pip install ./python/
{envpython} -m pytest {posargs}
deps =
ewmh
pytest-xdist
python-xlib
./python/
; Pass $PWD as it is when tox is invoked to pytest (used to find hlwm binaries)
; LSAN_OPTIONS is used for suppressing warnings about known memory leaks
passenv = PWD LSAN_OPTIONS
[testenv:flake8]
deps =
flake8 == 3.8.3
commands = flake8 .
[flake8]
ignore =
E501, # line too long
W503, # incompatible with pep8.. "Line break occurred before a binary operator"
[pytest]
markers =
exclude_from_coverage: Some tests are not relevant for the coverage report
# get python stacktrace when a test takes more than 'faulthandler_timeout' secs
# https://docs.pytest.org/en/latest/reference.html#confval-faulthandler_timeout
faulthandler_timeout = 240