Skip to content

Commit b48da28

Browse files
committed
Test float parsers with leading and trailing spaces
1 parent 9bd643f commit b48da28

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

pandas/tests/io/parser/dtypes/test_dtypes_basic.py

+5
Original file line numberDiff line numberDiff line change
@@ -200,6 +200,11 @@ def test_1000_sep_decimal_float_precision(
200200
# test decimal and thousand sep handling in across 'float_precision'
201201
# parsers
202202
decimal_number_check(c_parser_only, numeric_decimal, thousands, float_precision)
203+
text, value = numeric_decimal
204+
text = " " + text + " "
205+
if isinstance(value, str): # the negative cases (parse as text)
206+
value = " " + value + " "
207+
decimal_number_check(c_parser_only, (text, value), thousands, float_precision)
203208

204209

205210
def decimal_number_check(parser, numeric_decimal, thousands, float_precision):

0 commit comments

Comments
 (0)