File tree 3 files changed +12
-0
lines changed
3 files changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -12,6 +12,11 @@ if [ -n "$LOCALE_OVERRIDE" ]; then
12
12
python -c " $pycmd "
13
13
fi
14
14
15
+ # Enforce absent network during testing by faking a proxy
16
+ if echo " $TEST_ARGS " | grep -e --skip-network -q; then
17
+ export http_proxy=http://1.2.3.4 https_proxy=http://1.2.3.4;
18
+ fi
19
+
15
20
# Workaround for pytest-xdist flaky collection order
16
21
# https://github.com/pytest-dev/pytest/issues/920
17
22
# https://github.com/pytest-dev/pytest/issues/1075
Original file line number Diff line number Diff line change @@ -16,6 +16,11 @@ if [ "$SLOW" ]; then
16
16
TEST_ARGS=" --only-slow --skip-network"
17
17
fi
18
18
19
+ # Enforce absent network during testing by faking a proxy
20
+ if echo " $TEST_ARGS " | grep -e --skip-network -q; then
21
+ export http_proxy=http://1.2.3.4 https_proxy=http://1.2.3.4;
22
+ fi
23
+
19
24
if [ " $PIP_BUILD_TEST " ]; then
20
25
echo " We are not running pytest as this is a build test."
21
26
Original file line number Diff line number Diff line change @@ -53,6 +53,7 @@ def test_xarray(df):
53
53
assert df .to_xarray () is not None
54
54
55
55
56
+ @tm .network
56
57
def test_statsmodels ():
57
58
58
59
statsmodels = import_module ('statsmodels' ) # noqa
@@ -73,6 +74,7 @@ def test_scikit_learn(df):
73
74
clf .predict (digits .data [- 1 :])
74
75
75
76
77
+ @tm .network
76
78
def test_seaborn ():
77
79
78
80
seaborn = import_module ('seaborn' )
You can’t perform that action at this time.
0 commit comments