Skip to content

Commit ffcb7c2

Browse files
committed
test: xfail python engine with consecutive thousand separators
1 parent e1e327a commit ffcb7c2

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

pandas/tests/io/parser/common/test_common_basic.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ def test_read_csv_local(all_parsers, csv1):
8282
("2,,3,4,,,,,,,,,,,,5", 2345),
8383
],
8484
)
85-
def test_1000_sep(all_parsers, number_csv, expected_number):
85+
def test_1000_sep(all_parsers, number_csv, expected_number, request):
8686
parser = all_parsers
8787
data = f"""A|B|C
8888
1|{number_csv}|5
@@ -95,6 +95,11 @@ def test_1000_sep(all_parsers, number_csv, expected_number):
9595
with pytest.raises(ValueError, match=msg):
9696
parser.read_csv(StringIO(data), sep="|", thousands=",")
9797
return
98+
elif parser.engine == "python" and ",," in number_csv:
99+
mark = pytest.mark.xfail(
100+
reason="Python engine doesn't allow consecutive thousands separators"
101+
)
102+
request.applymarker(mark)
98103

99104
result = parser.read_csv(StringIO(data), sep="|", thousands=",")
100105
tm.assert_frame_equal(result, expected)

0 commit comments

Comments
 (0)