@@ -146,7 +146,11 @@ def test_h5_io(self):
146
146
self .assertEqual (list (s .keys ()), ['e' , 'f' ])
147
147
148
148
def test_xlsx_pandas_io (self ):
149
- self .session .save (abspath ('test_session.xlsx' ), engine = 'pandas_excel' )
149
+ fpath = abspath ('test_session.xlsx' )
150
+ self .session .save (fpath , engine = 'pandas_excel' )
151
+ s = Session ()
152
+ s .load (fpath , engine = 'pandas_excel' )
153
+ self .assertEqual (list (s .keys ()), ['e' , 'g' , 'f' ])
150
154
151
155
fpath = abspath ('test_session_ef.xlsx' )
152
156
self .session .save (fpath , ['e' , 'f' ], engine = 'pandas_excel' )
@@ -156,7 +160,12 @@ def test_xlsx_pandas_io(self):
156
160
157
161
@pytest .mark .skipif (xw is None , reason = "xlwings is not available" )
158
162
def test_xlsx_xlwings_io (self ):
159
- self .session .save (abspath ('test_session_xw.xlsx' ), engine = 'xlwings_excel' )
163
+ fpath = abspath ('test_session_xw.xlsx' )
164
+ self .session .save (fpath , engine = 'xlwings_excel' )
165
+ s = Session ()
166
+ s .load (fpath , engine = 'xlwings_excel' )
167
+ # ordering is only kept if the file did not exist previously (otherwise the ordering is left intact)
168
+ self .assertEqual (list (s .keys ()), ['e' , 'g' , 'f' ])
160
169
161
170
fpath = abspath ('test_session_ef_xw.xlsx' )
162
171
self .session .save (fpath , ['e' , 'f' ], engine = 'xlwings_excel' )
0 commit comments