Skip to content

Commit ba93669

Browse files
committed
TST: when xlrd is not installed skip tests needing it, close #1941
1 parent b9848a6 commit ba93669

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

pandas/io/tests/test_parsers.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -787,6 +787,7 @@ def test_xlsx_table(self):
787787

788788
def test_parse_cols_int(self):
789789
_skip_if_no_openpyxl()
790+
_skip_if_no_xlrd()
790791

791792
suffix = ['', 'x']
792793

@@ -804,11 +805,11 @@ def test_parse_cols_int(self):
804805

805806
def test_parse_cols_list(self):
806807
_skip_if_no_openpyxl()
808+
_skip_if_no_xlrd()
807809

808810
suffix = ['', 'x']
809811

810812
for s in suffix:
811-
812813
pth = os.path.join(self.dirpath, 'test.xls%s' % s)
813814
xlsx = ExcelFile(pth)
814815
df = xlsx.parse('Sheet1', index_col=0, parse_dates=True,

pandas/tests/test_frame.py

+2
Original file line numberDiff line numberDiff line change
@@ -3648,6 +3648,7 @@ def test_to_excel_multiindex(self):
36483648

36493649
def test_to_excel_float_format(self):
36503650
try:
3651+
import xlrd
36513652
import xlwt
36523653
import openpyxl
36533654
except ImportError:
@@ -3671,6 +3672,7 @@ def test_to_excel_float_format(self):
36713672
def test_to_excel_unicode_filename(self):
36723673
try:
36733674
import xlwt
3675+
import xlrd
36743676
import openpyxl
36753677
except ImportError:
36763678
raise nose.SkipTest

0 commit comments

Comments
 (0)