@@ -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 )
136137def 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