Skip to content

Commit 1364784

Browse files
committed
CI: Add separate test environment for pytz
The separate tests with and without pytz are done to try to minimize the possibility of implicit dependencies on pytz. Run the second test in it's own entry in the script section of the travis file so that it does not mask failures from other sections.
1 parent f8e76bf commit 1364784

File tree

3 files changed

+13
-0
lines changed

3 files changed

+13
-0
lines changed

.travis.yml

+4
Original file line numberDiff line numberDiff line change
@@ -158,14 +158,18 @@ before_script: |
158158
fi
159159
160160
script:
161+
# each script we want to run need to go in it's own section and the program you want
162+
# to fail travis need to be the last thing called
161163
- |
162164
echo "Calling pytest with the following arguments: $PYTEST_ADDOPTS"
163165
python -mpytest
166+
- tox -e pytz
164167
- |
165168
if [[ $RUN_FLAKE8 == 1 ]]; then
166169
flake8 --statistics && echo "Flake8 passed without any issues!"
167170
fi
168171
172+
169173
before_cache: |
170174
rm -rf $HOME/.cache/matplotlib/tex.cache
171175
rm -rf $HOME/.cache/matplotlib/test_cache

requirements/testing/travis_all.txt

+1
Original file line numberDiff line numberDiff line change
@@ -17,3 +17,4 @@ pytest-xdist
1717
python-dateutil
1818
sphinx
1919
tornado
20+
tox

tox.ini

+8
Original file line numberDiff line numberDiff line change
@@ -18,3 +18,11 @@ commands =
1818
pytest --pyargs matplotlib
1919
deps =
2020
pytest
21+
22+
[testenv:pytz]
23+
changedir = /tmp
24+
commands =
25+
pytest -m pytz {toxinidir}
26+
deps =
27+
pytest
28+
pytz

0 commit comments

Comments
 (0)