Skip to content

Commit d5e075e

Browse files
committed
TST: skip unicode filename test if system requires encoding to ascii
1 parent b8e7a35 commit d5e075e

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

pandas/tests/test_frame.py

+8
Original file line numberDiff line numberDiff line change
@@ -3635,6 +3635,14 @@ def test_to_excel_unicode_filename(self):
36353635

36363636
for ext in ['xls', 'xlsx']:
36373637
filename = u'\u0192u.' + ext
3638+
3639+
try:
3640+
f = open(filename, 'wb')
3641+
except UnicodeEncodeError:
3642+
raise nose.SkipTest('no unicode file names on this system')
3643+
else:
3644+
f.close()
3645+
36383646
df = DataFrame([[0.123456, 0.234567, 0.567567],
36393647
[12.32112, 123123.2, 321321.2]],
36403648
index=['A', 'B'], columns=['X', 'Y', 'Z'])

0 commit comments

Comments
 (0)