File tree Expand file tree Collapse file tree 3 files changed +19
-0
lines changed
doc/tutorial/text_analytics Expand file tree Collapse file tree 3 files changed +19
-0
lines changed Original file line number Diff line number Diff line change @@ -11,6 +11,11 @@ python -c "import numpy; print('numpy %s' % numpy.__version__)"
1111python -c " import scipy; print('scipy %s' % scipy.__version__)"
1212python setup.py build_ext --inplace
1313
14+ # Skip tests that require large downloads over the network to save bandwith
15+ # usage as travis workers are stateless and therefore traditional local
16+ # disk caching does not work.
17+ export SKLEARN_SKIP_NETWORK_TESTS=1
18+
1419if [[ " $COVERAGE " == " true" ]]; then
1520 make test-coverage
1621else
Original file line number Diff line number Diff line change 1+ from sklearn .utils .testing import check_skip_network
2+
3+
4+ def setup_module ():
5+ check_skip_network ()
Original file line number Diff line number Diff line change 88# Arnaud Joly
99# Denis Engemann
1010# License: BSD 3 clause
11+ import os
1112import inspect
1213import pkgutil
1314import warnings
@@ -578,3 +579,11 @@ def clean_warning_registry():
578579 for mod in sys .modules .copy ().values ():
579580 if hasattr (mod , reg ):
580581 getattr (mod , reg ).clear ()
582+
583+
584+ def check_skip_network ():
585+ if int (os .environ .get ('SKLEARN_SKIP_NETWORK_TESTS' , 0 )):
586+ raise SkipTest ("Text tutorial requires large dataset download" )
587+
588+
589+ with_network = with_setup (check_skip_network )
You can’t perform that action at this time.
0 commit comments