Skip to content

Commit 0472559

Browse files
committed
BUG: Expand encoding for C engine beyond utf-16
And by utf-16, we mean the string "utf-16" Closes pandas-dev#24130
1 parent 8d8ff8f commit 0472559

File tree

1 file changed

+26
-0
lines changed

1 file changed

+26
-0
lines changed

pandas/tests/io/parser/conftest.py

+26
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,32 @@ def python_parser_only(request):
107107
]
108108

109109

110+
@pytest.fixture(params=_utf_values)
111+
def utf_value(request):
112+
"""
113+
Fixture for all possible integer values for a UTF encoding.
114+
"""
115+
return request.param
116+
117+
118+
@pytest.fixture(params=_encoding_fmts)
119+
def encoding_fmt(request):
120+
"""
121+
Fixture for all possible string formats of a UTF encoding.
122+
"""
123+
return request.param
124+
125+
126+
_utf_values = [8, 16, 32]
127+
128+
_encoding_seps = ["", "-", "_"]
129+
_encoding_prefixes = ["utf", "UTF"]
130+
131+
_encoding_fmts = [
132+
f"{prefix}{sep}" + "{0}" for sep in _encoding_seps for prefix in _encoding_prefixes
133+
]
134+
135+
110136
@pytest.fixture(params=_utf_values)
111137
def utf_value(request):
112138
"""

0 commit comments

Comments
 (0)