Skip to content

TST: skip tests when using an old scipy for gaussian_kde #7151

@jreback

Description

@jreback

These tests are all marked slow, so not sure if they are being tested on travis. I just enabled them on windows, bunch fail (also some in tests/test_graphics.py), same reason

need to do an additional check not only skip if we don't have scipy, but must have a recent version (not exactly sure when gaussian_kde was added).

using scipy 0.10.1

======================================================================
ERROR: test_secondary_kde (pandas.tseries.tests.test_plotting.TestTSPlot)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "c:\Users\Jeff Reback\Documents\GitHub\pandas\build\lib.win32-2.6\pandas\tseries\tests\test_plotting.py", line 573, in test_secondary_kde
    ax = ser.plot(secondary_y=True, kind='density').right_ax
  File "c:\Users\Jeff Reback\Documents\GitHub\pandas\build\lib.win32-2.6\pandas\tools\plotting.py", line 2256, in plot_series
    plot_obj.generate()
  File "c:\Users\Jeff Reback\Documents\GitHub\pandas\build\lib.win32-2.6\pandas\tools\plotting.py", line 902, in generate
    self._make_plot()
  File "c:\Users\Jeff Reback\Documents\GitHub\pandas\build\lib.win32-2.6\pandas\tools\plotting.py", line 1346, in _make_plot
    from scipy.stats import gaussian_kde
  File "C:\python26-32\lib\site-packages\scipy\stats\__init__.py", line 322, in <module>
    from stats import *
  File "C:\python26-32\lib\site-packages\scipy\stats\stats.py", line 198, in <module>
    import distributions
  File "C:\python26-32\lib\site-packages\scipy\stats\distributions.py", line 14, in <module>
    from scipy import optimize
  File "C:\python26-32\lib\site-packages\scipy\optimize\__init__.py", line 135, in <module>
    from nonlin import *
  File "C:\python26-32\lib\site-packages\scipy\optimize\nonlin.py", line 118, in <module>
    import scipy.sparse.linalg
  File "C:\python26-32\lib\site-packages\scipy\sparse\__init__.py", line 182, in <module>
    from csgraph import *
  File "C:\python26-32\lib\site-packages\scipy\sparse\csgraph\__init__.py", line 148, in <module>
    from ._shortest_path import shortest_path, floyd_warshall, dijkstra,\
ImportError: cannot import name shortest_path

Metadata

Metadata

Assignees

No one assigned

    Labels

    Testingpandas testing functions or related to the test suite

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions