-
Notifications
You must be signed in to change notification settings - Fork 0
/
tox.ini
44 lines (33 loc) · 1.22 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
[tox]
envlist =
skip-browser-tests,chrome,firefox,firefox-xvfb
skip_missing_interpreters = true
[testenv]
# Include numpy in deps to ensure the package is built with the same version as
# is installed. Otherwise, setup_requires may result in it being built with a
# prerelease version that is incompatible with the installed version.
deps =
numpy
extras =
test
chrome,firefox: test-browser
chrome: test-chrome
firefox: test-firefox
whitelist_externals =
xvfb-run
# Pass through DISPLAY to allow non-headless web browsers on Linux
passenv = DISPLAY
setenv =
PYTHONUNBUFFERED = yes
changedir = python/tests
# browser-based tests are flaky and can hang, so set a 30 second timeout and retry up to 10 times.
# Use `timeout_func_only=true` to work around https://github.com/pytest-dev/pytest-rerunfailures/issues/99
commands = pytest -vv -s --timeout=30 -o timeout_func_only=true --reruns 10
[testenv:skip-browser-tests]
commands = {[testenv]commands} --skip-browser-tests
[testenv:chrome]
commands = {[testenv]commands} --browser chrome
[testenv:firefox]
commands = {[testenv]commands} --browser firefox
[testenv:firefox-xvfb]
commands = xvfb-run --auto-servernum --server-args='-screen 0 1024x768x24' {[testenv:firefox]commands}