Skip to content

Commit

Permalink
fix broken test case for py2
Browse files Browse the repository at this point in the history
  • Loading branch information
chfw committed May 18, 2015
1 parent a689be6 commit ad68abc
Showing 1 changed file with 13 additions and 4 deletions.
17 changes: 13 additions & 4 deletions tests/test_io.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
import sys
from pyexcel_io import load_data, StringIO, get_writer, get_io, BytesIO
from nose.tools import raises

PY2 = sys.version_info[0] == 2


@raises(IOError)
def test_wrong_parameter_to_load_data():
Expand All @@ -24,8 +27,11 @@ def test_load_ods_data():

@raises(NotImplementedError)
def test_load_xls_data_from_memory():
io = BytesIO()
load_data(io, file_type="xls")
if not PY2:
io = BytesIO()
load_data(io, file_type="xls")
else:
pass

@raises(IOError)
def test_load_xlsm_data_from_memory():
Expand All @@ -40,8 +46,11 @@ def test_write_xlsx_data():

@raises(IOError)
def test_writer_xlsm_data_from_memory():
io = StringIO()
get_writer(io, file_type="xlsm")
if not PY2:
io = StringIO()
get_writer(io, file_type="xlsm")
else:
pass


@raises(NotImplementedError)
Expand Down

0 comments on commit ad68abc

Please sign in to comment.