File tree 1 file changed +12
-0
lines changed
1 file changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -150,6 +150,18 @@ def test_missing_required_dependency():
150
150
# https://github.com/MacPython/pandas-wheels/pull/50
151
151
152
152
pyexe = sys .executable .replace ("\\ " , "/" )
153
+
154
+ # We skip this test if pandas is installed as a site package. We first
155
+ # import the package normally and check the path to the module before
156
+ # executing the test which imports pandas with site packages disabled.
157
+ call = [pyexe , "-c" , "import pandas;print(pandas.__file__)" ]
158
+ output = subprocess .check_output (call ).decode ()
159
+ if "site-packages" in output :
160
+ pytest .skip ("pandas installed as site package" )
161
+
162
+ # This test will fail if pandas is installed as a site package. The flags
163
+ # prevent pandas being imported and the test will report Failed: DID NOT
164
+ # RAISE <class 'subprocess.CalledProcessError'>
153
165
call = [pyexe , "-sSE" , "-c" , "import pandas" ]
154
166
155
167
msg = (
You can’t perform that action at this time.
0 commit comments