Skip to content

Commit

Permalink
Failing test_missing_required_dependency in pandas-wheels (#37428)
Browse files Browse the repository at this point in the history
  • Loading branch information
simonjayhawkins authored Oct 27, 2020
1 parent c642fda commit b39c0b5
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions pandas/tests/test_downstream.py
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,18 @@ def test_missing_required_dependency():
# https://github.com/MacPython/pandas-wheels/pull/50

pyexe = sys.executable.replace("\\", "/")

# We skip this test if pandas is installed as a site package. We first
# import the package normally and check the path to the module before
# executing the test which imports pandas with site packages disabled.
call = [pyexe, "-c", "import pandas;print(pandas.__file__)"]
output = subprocess.check_output(call).decode()
if "site-packages" in output:
pytest.skip("pandas installed as site package")

# This test will fail if pandas is installed as a site package. The flags
# prevent pandas being imported and the test will report Failed: DID NOT
# RAISE <class 'subprocess.CalledProcessError'>
call = [pyexe, "-sSE", "-c", "import pandas"]

msg = (
Expand Down

0 comments on commit b39c0b5

Please sign in to comment.