Skip to content

Commit a14874f

Browse files
TomAugspurgerjreback
authored andcommitted
xfail test_missing_required_dependency test (#26993)
1 parent 9aef32d commit a14874f

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed

pandas/tests/test_downstream.py

+10-3
Original file line numberDiff line numberDiff line change
@@ -133,13 +133,20 @@ def test_pyarrow(df):
133133
tm.assert_frame_equal(result, df)
134134

135135

136+
@pytest.mark.xfail(reason="pandas-wheels-50", strict=False)
136137
def test_missing_required_dependency():
137138
# GH 23868
138-
# use the -S flag to disable site-packages
139-
call = ['python', '-S', '-c', 'import pandas']
139+
# To ensure proper isolation, we pass these flags
140+
# -S : disable site-packages
141+
# -s : disable user site-packages
142+
# -E : disable PYTHON* env vars, especially PYTHONPATH
143+
# And, that's apparently not enough, so we give up.
144+
# https://github.com/MacPython/pandas-wheels/pull/50
145+
call = ['python', '-sSE', '-c', 'import pandas']
140146

141147
with pytest.raises(subprocess.CalledProcessError) as exc:
142148
subprocess.check_output(call, stderr=subprocess.STDOUT)
143149

144150
output = exc.value.stdout.decode()
145-
assert all(x in output for x in ['numpy', 'pytz', 'dateutil'])
151+
for name in ['numpy', 'pytz', 'dateutil']:
152+
assert name in output

0 commit comments

Comments
 (0)