On Wed, 02 Oct 2013, Phillip Cloud wrote:
>  >              with ExcelWriter(pth) as writer:
>  >                  self.frame.to_excel(writer, 'Data1')
>  >                  self.frame2.to_excel(writer, 'Data2')
>  > -
>  > +            # If above test passes with outdated xlrd, next test
>  > +            # does require fresh xlrd
>  > +            # http://nipy.bic.berkeley.edu/builders/pandas-py2.x-wheezy-sparc/builds/148/steps/shell_4/logs/stdio
>  > +            _skip_if_no_xlrd((0, 9))

>    [1]@yarikoptic just an FYI you can compare versions much more easily with
>    the distutils.versions.LooseVersion class:

thanks -- I know it well ;)  I just came up with the minimalistic patch
here.  So +1 to replace that tuple comparison with LooseVersion(version)
comparison


>    I'm also -1 on different versions of things for different tests, although
>    i do something kind of like this for read_html (basically if bs4 version
>    is 4.2.0 then i raise, but that's only tested in one place and i skip
>    tests otherwise)

btw -- while at it... you might like how we 'centralized' version
checking in PyMVPA:

versions "dict" gets populated upon request for a given module:
https://github.com/PyMVPA/PyMVPA/blob/HEAD/mvpa2/base/externals.py
and then we have a generic helper (not per module e.g. _skip_if_no_xlrd):

    skip_if_no_external('mdp', min_version='2.5')

which also could have max_version .

Cheers

>    it would be ideal to have all of our tests support a single minimum
>    version

well, imho it is ok sooner or later for some tests support new functionality of
external modules while older ones being as good for whatever uses only
old goodies

-- 
Yaroslav O. Halchenko, Ph.D.
http://neuro.debian.net http://www.pymvpa.org http://www.fail2ban.org
Senior Research Associate,     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