We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents bac7c6e + 00af0de commit 1c1f9b4Copy full SHA for 1c1f9b4
pandas/io/tests/test_excel.py
@@ -1070,12 +1070,15 @@ def test_ExcelWriter_dispatch(self):
1070
except ImportError:
1071
_skip_if_no_openpyxl()
1072
writer_klass = _OpenpyxlWriter
1073
- writer = ExcelWriter('apple.xlsx')
1074
- tm.assert_isinstance(writer, writer_klass)
+
+ with ensure_clean('.xlsx') as path:
1075
+ writer = ExcelWriter(path)
1076
+ tm.assert_isinstance(writer, writer_klass)
1077
1078
_skip_if_no_xlwt()
- writer = ExcelWriter('apple.xls')
- tm.assert_isinstance(writer, _XlwtWriter)
1079
+ with ensure_clean('.xls') as path:
1080
1081
+ tm.assert_isinstance(writer, _XlwtWriter)
1082
1083
def test_register_writer(self):
1084
# some awkward mocking to test out dispatch and such actually works
0 commit comments