Skip to content

Commit

Permalink
MAINT: Stop testing on old, bugy SciPy
Browse files Browse the repository at this point in the history
Prevent -OO test from running on buggy scipy
  • Loading branch information
bashtage committed Aug 4, 2019
1 parent 9fece3c commit b45fce6
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 1 deletion.
1 change: 0 additions & 1 deletion MANIFEST.in
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ graft statsmodels/datasets
graft statsmodels/sandbox/regression/data
graft statsmodels/sandbox/tests
graft statsmodels/sandbox/tsa/examples
graft statsmodels/tsa/vector_ar/data
recursive-include docs/source *
exclude docs/source/generated/*
recursive-include docs/sphinxext *
Expand Down
6 changes: 6 additions & 0 deletions statsmodels/compat/scipy.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
from distutils.version import LooseVersion

import numpy as np
import scipy

SCIPY_11 = (LooseVersion(scipy.__version__) < LooseVersion('1.2.0') and
LooseVersion(scipy.__version__) >= LooseVersion('1.1.0'))


def _next_regular(target):
Expand Down
4 changes: 4 additions & 0 deletions statsmodels/tests/test_package.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
import subprocess

import pytest

from statsmodels.compat.platform import PLATFORM_WIN
from statsmodels.compat.scipy import SCIPY_11


def test_lazy_imports():
Expand All @@ -19,6 +22,7 @@ def test_lazy_imports():
assert rc == 0


@pytest.mark.skipif(SCIPY_11, reason='SciPy raises on -OO')
def test_docstring_optimization_compat():
# GH#5235 check that importing with stripped docstrings doesn't raise
p = subprocess.Popen('python -OO -c "import statsmodels.api as sm"',
Expand Down

0 comments on commit b45fce6

Please sign in to comment.