File tree 1 file changed +5
-11
lines changed 1 file changed +5
-11
lines changed Original file line number Diff line number Diff line change 6
6
"""
7
7
8
8
import codecs
9
- import ctypes
10
9
from collections import OrderedDict
11
10
import csv
12
11
from datetime import datetime
@@ -1905,20 +1904,15 @@ def test_suppress_error_output(all_parsers, capsys):
1905
1904
assert captured .err == ""
1906
1905
1907
1906
1908
- def __windows_ansi_encoding_not_cp1252 ():
1909
- if compat .is_platform_windows ():
1910
- ansi_codepage = ctypes .cdll .kernel32 .GetACP ()
1911
- return ansi_codepage != 1252 and not compat .PY36
1912
- return False
1913
-
1914
- @pytest .mark .skipif (__windows_ansi_encoding_not_cp1252 (),
1915
- reason = "On Python < 3.6 won't pass on non-1252 codepage" )
1916
- def test_filename_with_special_chars (all_parsers ):
1907
+ @pytest .mark .skipif (compat .is_platform_windows () and not compat .PY36 ,
1908
+ reason = "On Python < 3.6 won't pass on Windows" )
1909
+ @pytest .mark .parametrize ("filename" , ["sé-es-vé.csv" , "ru-sй.csv" ])
1910
+ def test_filename_with_special_chars (all_parsers , filename ):
1917
1911
# see gh-15086.
1918
1912
parser = all_parsers
1919
1913
df = DataFrame ({"a" : [1 , 2 , 3 ]})
1920
1914
1921
- with tm .ensure_clean ("sé-es-vé-sй.csv" ) as path :
1915
+ with tm .ensure_clean (filename ) as path :
1922
1916
df .to_csv (path , index = False )
1923
1917
1924
1918
result = parser .read_csv (path )
You can’t perform that action at this time.
0 commit comments