File tree 1 file changed +7
-4
lines changed
1 file changed +7
-4
lines changed Original file line number Diff line number Diff line change 21
21
import pandas as pd
22
22
23
23
24
- def _skip_if_no_xlrd ():
24
+ def _skip_if_no_xlrd (version = ( 0 , 9 ) ):
25
25
try :
26
26
import xlrd
27
27
ver = tuple (map (int , xlrd .__VERSION__ .split ("." )[:2 ]))
28
- if ver < ( 0 , 9 ) :
29
- raise nose .SkipTest ('xlrd < 0.9 , skipping' )
28
+ if ver < version :
29
+ raise nose .SkipTest ('xlrd < %s , skipping' % str ( version ) )
30
30
except ImportError :
31
31
raise nose .SkipTest ('xlrd not installed, skipping' )
32
32
@@ -350,7 +350,10 @@ def test_excelwriter_contextmanager(self):
350
350
with ExcelWriter (pth ) as writer :
351
351
self .frame .to_excel (writer , 'Data1' )
352
352
self .frame2 .to_excel (writer , 'Data2' )
353
-
353
+ # If above test passes with outdated xlrd, next test
354
+ # does require fresh xlrd
355
+ # http://nipy.bic.berkeley.edu/builders/pandas-py2.x-wheezy-sparc/builds/148/steps/shell_4/logs/stdio
356
+ _skip_if_no_xlrd ((0 , 9 ))
354
357
with ExcelFile (pth ) as reader :
355
358
found_df = reader .parse ('Data1' )
356
359
found_df2 = reader .parse ('Data2' )
You can’t perform that action at this time.
0 commit comments