forked from google/neuroglancer
-
Notifications
You must be signed in to change notification settings - Fork 1
/
tox.ini
42 lines (31 loc) · 1.2 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
[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
tensorstore
extras =
test
chrome,firefox: test-browser
# Pass through DISPLAY to allow non-headless web browsers on Linux
passenv = DISPLAY
setenv =
PYTHONUNBUFFERED = yes
changedir = python/tests
allowlist_externals = xvfb-run
# 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 {posargs}
[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}