|
5 | 5 | import sys
|
6 | 6 | import os
|
7 | 7 | from distutils.version import LooseVersion
|
| 8 | +from functools import partial |
8 | 9 |
|
9 | 10 | import warnings
|
10 | 11 | from warnings import catch_warnings
|
@@ -551,7 +552,7 @@ def test_sheet_name_and_sheetname(self):
|
551 | 552 | dfref = self.get_csv_refdf('test1')
|
552 | 553 | df1 = self.get_exceldf('test1', sheet_name='Sheet1') # doc
|
553 | 554 | with tm.assert_produces_warning(FutureWarning, check_stacklevel=False):
|
554 |
| - df2 = self.get_exceldf('test1', sheetname='Sheet2') # bkwrd compat |
| 555 | + df2 = self.get_exceldf('test1', sheetname='Sheet1') # bkwrd compat |
555 | 556 |
|
556 | 557 | tm.assert_frame_equal(df1, dfref, check_names=False)
|
557 | 558 | tm.assert_frame_equal(df2, dfref, check_names=False)
|
@@ -1876,12 +1877,18 @@ def test_freeze_panes(self):
|
1876 | 1877 |
|
1877 | 1878 | def test_path_pathlib(self):
|
1878 | 1879 | df = tm.makeDataFrame()
|
1879 |
| - result = tm.round_trip_pathlib(df.to_excel, pd.read_excel) |
| 1880 | + writer = partial(df.to_excel, engine=self.engine_name) |
| 1881 | + reader = partial(pd.read_excel) |
| 1882 | + result = tm.round_trip_pathlib(writer, reader, |
| 1883 | + path="foo.{}".format(self.ext)) |
1880 | 1884 | tm.assert_frame_equal(df, result)
|
1881 | 1885 |
|
1882 | 1886 | def test_path_localpath(self):
|
1883 | 1887 | df = tm.makeDataFrame()
|
1884 |
| - result = tm.round_trip_localpath(df.to_excel, pd.read_excel) |
| 1888 | + writer = partial(df.to_excel, engine=self.engine_name) |
| 1889 | + reader = partial(pd.read_excel) |
| 1890 | + result = tm.round_trip_pathlib(writer, reader, |
| 1891 | + path="foo.{}".format(self.ext)) |
1885 | 1892 | tm.assert_frame_equal(df, result)
|
1886 | 1893 |
|
1887 | 1894 |
|
|
0 commit comments