Skip to content

Commit 035af75

Browse files
committed
fixup! ENH: add __fspath__ to pandas own file-like objects
1 parent d467ec7 commit 035af75

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

pandas/io/formats/excel.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
import numpy as np
99

10-
from pandas.compat import reduce, string_types
10+
from pandas.compat import reduce
1111
from pandas.io.formats.css import CSSResolver, CSSWarning
1212
from pandas.io.formats.printing import pprint_thing
1313
from pandas.core.dtypes.common import is_float

pandas/tests/io/test_excel.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -2505,7 +2505,7 @@ class TestFSPath(object):
25052505

25062506
@pytest.mark.skipif(sys.version_info < (3, 6), reason='requires fspath')
25072507
def test_excelfile_fspath(self):
2508-
_skip_if_no_openpyxl
2508+
_skip_if_no_openpyxl()
25092509
with tm.ensure_clean('foo.xlsx') as path:
25102510
df = DataFrame({"A": [1, 2]})
25112511
df.to_excel(path)
@@ -2516,7 +2516,7 @@ def test_excelfile_fspath(self):
25162516
@pytest.mark.skipif(sys.version_info < (3, 6), reason='requires fspath')
25172517
# @pytest.mark.xfail
25182518
def test_excelwriter_fspath(self):
2519-
_skip_if_no_openpyxl
2519+
_skip_if_no_openpyxl()
25202520
with tm.ensure_clean('foo.xlsx') as path:
25212521
writer = ExcelWriter(path)
25222522
assert os.fspath(writer) == str(path)

0 commit comments

Comments
 (0)