On Wed, 26 Nov 2014, Tomasz Buchert wrote: > + import pandas as _ > +- return True > ++ return hasattr(_, "DateRange")
imho this is way too aggressive and would cause skipping all pandas related tests (DateRange dependent or not) > + except ImportError: > + return False > + > +Index: statsmodels-0.4.2/statsmodels/tsa/base/tests/test_datetools.py > +=================================================================== > +--- statsmodels-0.4.2.orig/statsmodels/tsa/base/tests/test_datetools.py > ++++ statsmodels-0.4.2/statsmodels/tsa/base/tests/test_datetools.py > +@@ -3,6 +3,7 @@ import numpy.testing as npt > + from statsmodels.tsa.base.datetools import (_date_from_idx, > + _idx_from_dates, date_parser, date_range_str, > dates_from_str, > + dates_from_range, _infer_freq, _freq_to_pandas) > ++import nose > + > + def test_date_from_idx(): > + d1 = datetime(2008, 12, 31) > +@@ -15,6 +16,7 @@ def test_date_from_idx(): > + npt.assert_equal(_date_from_idx(d1, idx, 'M'), datetime(2010, 3, 31)) > + > + def test_idx_from_date(): > ++ raise nose.SkipTest("Skipped because of missing DateRange") if you are introducing these changes, why not to make def skip_if_no_daterange(): try: import pandas as _ if not hasaattr(_, "DateRange"): raise nose.SkipTest("Skipped because...") except ImportError: raise nose.SkipTest("Skipped because no pandas...") and just call that one? -- Yaroslav O. Halchenko, Ph.D. http://neuro.debian.net http://www.pymvpa.org http://www.fail2ban.org Research Scientist, Psychological and Brain Sciences Dept. Dartmouth College, 419 Moore Hall, Hinman Box 6207, Hanover, NH 03755 Phone: +1 (603) 646-9834 Fax: +1 (603) 646-1419 WWW: http://www.linkedin.com/in/yarik -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org