Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 10 additions & 3 deletions pandas/tests/test_downstream.py
Original file line number Diff line number Diff line change
Expand Up @@ -133,13 +133,20 @@ def test_pyarrow(df):
tm.assert_frame_equal(result, df)


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

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

output = exc.value.stdout.decode()
assert all(x in output for x in ['numpy', 'pytz', 'dateutil'])
for name in ['numpy', 'pytz', 'dateutil']:
assert name in output