Skip to content

nosetest errors when "xlrd" isn't installed #1941

Closed
@gerigk

Description

@gerigk

Maybe this is because I have openpyxl but not xlrd installed.

Anyway, I guess the tests should be skipped instead of throwing an error.

======================================================================
ERROR: test_parse_cols_int (pandas.io.tests.test_parsers.TestParsers)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/arthur/python-packages/pandas/pandas/io/tests/test_parsers.py", line 795, in test_parse_cols_int
    xls = ExcelFile(pth)
  File "/home/arthur/python-packages/pandas/pandas/io/parsers.py", line 1257, in __init__
    import xlrd
ImportError: No module named xlrd

======================================================================
ERROR: test_parse_cols_list (pandas.io.tests.test_parsers.TestParsers)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/arthur/python-packages/pandas/pandas/io/tests/test_parsers.py", line 813, in test_parse_cols_list
    xlsx = ExcelFile(pth)
  File "/home/arthur/python-packages/pandas/pandas/io/parsers.py", line 1257, in __init__
    import xlrd
ImportError: No module named xlrd

======================================================================
ERROR: test_to_excel_float_format (pandas.tests.test_frame.TestDataFrame)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/arthur/python-packages/pandas/pandas/tests/test_frame.py", line 3663, in test_to_excel_float_format
    reader = ExcelFile(filename)
  File "/home/arthur/python-packages/pandas/pandas/io/parsers.py", line 1257, in __init__
    import xlrd
ImportError: No module named xlrd

======================================================================
ERROR: test_to_excel_unicode_filename (pandas.tests.test_frame.TestDataFrame)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/arthur/python-packages/pandas/pandas/tests/test_frame.py", line 3693, in test_to_excel_unicode_filename
    reader = ExcelFile(filename)
  File "/home/arthur/python-packages/pandas/pandas/io/parsers.py", line 1257, in __init__
    import xlrd
ImportError: No module named xlrd

----------------------------------------------------------------------
Ran 2372 tests in 140.055s

FAILED (SKIP=18, errors=4)

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugTestingpandas 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