@@ -14,40 +14,60 @@ environment:
14
14
CMD_IN_ENV : " cmd /E:ON /V:ON /C obvci_appveyor_python_build_env.cmd"
15
15
# Workaround for https://github.com/conda/conda-build/issues/636
16
16
PYTHONIOENCODING : " UTF-8"
17
+ TEST_ARGS : --no-pep8
18
+ PYTEST_ARGS : -ra --timeout=300 --durations=25 # --cov-report= --cov=lib #-n %NUMBER_OF_PROCESSORS%
19
+ USE_PYTEST : no
20
+ PYTHONHASHSEED : 0 # Workaround for pytest-xdist flaky colletion order
21
+ # https://github.com/pytest-dev/pytest/issues/920
22
+ # https://github.com/pytest-dev/pytest/issues/1075
17
23
18
24
matrix :
19
- # for testing purpose: numpy 1.8 on py2.7, for the rest use 1.10/latest
20
- # theoretically the CONDA_INSTALL_LOCN could be only two: one for 32bit,
21
- # one for 64bit because we construct envs anyway. But using one for the
22
- # right python version is hopefully making it fast due to package caching.
25
+ # # for testing purpose: numpy 1.8 on py2.7, for the rest use 1.10/latest
26
+ # # theoretically the CONDA_INSTALL_LOCN could be only two: one for 32bit,
27
+ # # one for 64bit because we construct envs anyway. But using one for the
28
+ # # right python version is hopefully making it fast due to package caching.
29
+ # - TARGET_ARCH: "x64"
30
+ # CONDA_PY: "27"
31
+ # CONDA_NPY: "18"
32
+ # PYTHON_VERSION: "2.7"
33
+ # TEST_ALL: "no"
34
+ # CONDA_INSTALL_LOCN: "C:\\Miniconda-x64"
35
+ # - TARGET_ARCH: "x64"
36
+ # CONDA_PY: "34"
37
+ # CONDA_NPY: "110"
38
+ # PYTHON_VERSION: "3.4"
39
+ # TEST_ALL: "no"
40
+ # CONDA_INSTALL_LOCN: "C:\\Miniconda3-x64"
41
+ # - TARGET_ARCH: "x64"
42
+ # CONDA_PY: "35"
43
+ # CONDA_NPY: "110"
44
+ # PYTHON_VERSION: "3.5"
45
+ # TEST_ALL: "no"
46
+ # CONDA_INSTALL_LOCN: "C:\\Miniconda35-x64"
47
+ # - TARGET_ARCH: "x86"
48
+ # CONDA_PY: "27"
49
+ # CONDA_NPY: "18"
50
+ # PYTHON_VERSION: "2.7"
51
+ # # this variable influence pdf/svg and most importantly the latex related tests
52
+ # # which triples the runtime of the tests (7-8min vs 30min).
53
+ # # pick the one which seems to make the most problems and run it last, so that
54
+ # # the rest of the tests can give feedback earlier
55
+ # TEST_ALL: "yes"
56
+ # CONDA_INSTALL_LOCN: "C:\\Miniconda"
23
57
- TARGET_ARCH : " x64"
24
58
CONDA_PY : " 27"
25
59
CONDA_NPY : " 18"
26
60
PYTHON_VERSION : " 2.7"
27
61
TEST_ALL : " no"
28
62
CONDA_INSTALL_LOCN : " C:\\ Miniconda-x64"
29
- - TARGET_ARCH : " x64"
30
- CONDA_PY : " 34"
31
- CONDA_NPY : " 110"
32
- PYTHON_VERSION : " 3.4"
33
- TEST_ALL : " no"
34
- CONDA_INSTALL_LOCN : " C:\\ Miniconda3-x64"
63
+ USE_PYTEST : yes
35
64
- TARGET_ARCH : " x64"
36
65
CONDA_PY : " 35"
37
66
CONDA_NPY : " 110"
38
67
PYTHON_VERSION : " 3.5"
39
68
TEST_ALL : " no"
40
69
CONDA_INSTALL_LOCN : " C:\\ Miniconda35-x64"
41
- - TARGET_ARCH : " x86"
42
- CONDA_PY : " 27"
43
- CONDA_NPY : " 18"
44
- PYTHON_VERSION : " 2.7"
45
- # this variable influence pdf/svg and most importantly the latex related tests
46
- # which triples the runtime of the tests (7-8min vs 30min).
47
- # pick the one which seems to make the most problems and run it last, so that
48
- # the rest of the tests can give feedback earlier
49
- TEST_ALL : " yes"
50
- CONDA_INSTALL_LOCN : " C:\\ Miniconda"
70
+ USE_PYTEST : yes
51
71
52
72
# We always use a 64-bit machine, but can build x86 distributions
53
73
# with the PYTHON_ARCH variable (which is used by CMD_IN_ENV).
@@ -58,7 +78,7 @@ platform:
58
78
build : false
59
79
60
80
init :
61
- - cmd : " ECHO %PYTHON_VERSION% %CONDA_INSTALL_LOCN%"
81
+ - cmd : " ECHO %PYTHON_VERSION% PYTEST=%USE_PYTEST% %CONDA_INSTALL_LOCN%"
62
82
63
83
install :
64
84
- cmd : set PATH=%CONDA_INSTALL_LOCN%;%CONDA_INSTALL_LOCN%\scripts;%PATH%;
@@ -82,10 +102,14 @@ install:
82
102
# same things as the requirements in ci/conda_recipe/meta.yaml
83
103
# if conda-forge gets a new pyqt, it might be nice to install it as well to have more backends
84
104
# https://github.com/conda-forge/conda-forge.github.io/issues/157#issuecomment-223536381
85
- - cmd : conda create -q -n test-environment python=%PYTHON_VERSION% pip setuptools numpy python-dateutil freetype=2.6 msinttypes "tk=8.5" pyparsing pytz tornado "libpng>=1.6.21,<1.7" "zlib=1.2" "cycler>=0.10" nose mock
105
+ - conda create -q -n test-environment python=%PYTHON_VERSION%
106
+ pip setuptools numpy python-dateutil freetype=2.6 msinttypes "tk=8.5"
107
+ pyparsing pytz tornado "libpng>=1.6.21,<1.7" "zlib=1.2" "cycler>=0.10"
108
+ nose mock sphinx
86
109
- activate test-environment
87
110
- cmd : echo %PYTHON_VERSION% %TARGET_ARCH%
88
111
- cmd : IF %PYTHON_VERSION% == 2.7 conda install -q functools32
112
+ - if x%USE_PYTEST% == xyes conda install -q pytest pytest-cov pytest-timeout # pytest-xdist
89
113
90
114
# Let the install prefer the static builds of the libs
91
115
- set LIBRARY_LIB=%CONDA_PREFIX%\Library\lib
@@ -124,7 +148,9 @@ test_script:
124
148
# Test import of tkagg backend
125
149
- python -c "import matplotlib as m; m.use('tkagg'); import matplotlib.pyplot as plt; print(plt.get_backend())"
126
150
# tests
127
- - python tests.py
151
+ - if x%USE_PYTEST% == xyes echo The following args are passed to pytest %PYTEST_ARGS%
152
+ - if x%USE_PYTEST% == xyes py.test %PYTEST_ARGS% %TEST_ARGS%
153
+ - if x%USE_PYTEST% == xno python tests.py %TEST_ARGS%
128
154
# Generate a html for visual tests
129
155
- python visual_tests.py
130
156
0 commit comments