1111import pyexcel as pe
1212from pyexcel_libxlsxw import save_data
1313
14+ from nose .tools import eq_
15+
1416
1517class TestBugFix (TestCase ):
18+ def setUp (self ):
19+ self .maxDiff = None
20+
1621 def test_pyexcel_issue_5 (self ):
1722 """pyexcel issue #5
1823
@@ -21,10 +26,10 @@ def test_pyexcel_issue_5(self):
2126 s = pe .load (
2227 os .path .join ("tests" , "test-fixtures" , "test-date-format.xls" )
2328 )
24- s .save_as ("issue5.xlsx" )
29+ s .save_as ("issue5.xlsx" , library = "pyexcel-libxlsxw" )
2530 s2 = pe .load ("issue5.xlsx" )
26- assert s [0 , 0 ] == datetime .datetime (2015 , 11 , 11 , 11 , 12 , 0 )
27- assert s2 [0 , 0 ] == datetime .datetime (2015 , 11 , 11 , 11 , 12 , 0 )
31+ eq_ ( s [0 , 0 ], datetime .datetime (2015 , 11 , 11 , 11 , 12 , 0 ) )
32+ eq_ ( s2 [0 , 0 ], datetime .datetime (2015 , 11 , 11 , 11 , 12 , 0 ) )
2833
2934 def test_pyexcel_issue_8_with_physical_file (self ):
3035 """pyexcel issue #8
@@ -33,7 +38,7 @@ def test_pyexcel_issue_8_with_physical_file(self):
3338 """
3439 tmp_file = "issue_8_save_as.xlsx"
3540 s = pe .load (os .path .join ("tests" , "test-fixtures" , "test8.xlsx" ))
36- s .save_as (tmp_file )
41+ s .save_as (tmp_file , library = "pyexcel-libxlsxw" )
3742 s2 = pe .load (tmp_file )
3843 self .assertEqual (str (s ), str (s2 ))
3944 content = dedent (
@@ -58,7 +63,7 @@ def test_pyexcel_issue_8_with_memory_file(self):
5863 tmp_file = "issue_8_save_as.xlsx"
5964 f = open (os .path .join ("tests" , "test-fixtures" , "test8.xlsx" ), "rb" )
6065 s = pe .load_from_memory ("xlsx" , f .read ())
61- s .save_as (tmp_file )
66+ s .save_as (tmp_file , library = "pyexcel-libxlsxw" )
6267 s2 = pe .load (tmp_file )
6368 self .assertEqual (str (s ), str (s2 ))
6469 content = dedent (
0 commit comments