42
42
import pandas .io .date_converters as conv
43
43
from pandas .io .parsers import read_csv
44
44
45
- pytestmark = pytest .mark .usefixtures ("pyarrow_skip " )
45
+ xfail_pyarrow = pytest .mark .usefixtures ("pyarrow_xfail " )
46
46
47
47
# constant
48
48
_DEFAULT_DATETIME = datetime (1 , 1 , 1 )
54
54
date_strategy = st .datetimes ()
55
55
56
56
57
+ @xfail_pyarrow
57
58
def test_read_csv_with_custom_date_parser (all_parsers ):
58
59
# GH36111
59
60
def __custom_date_parser (time ):
@@ -91,6 +92,7 @@ def __custom_date_parser(time):
91
92
tm .assert_frame_equal (result , expected )
92
93
93
94
95
+ @xfail_pyarrow
94
96
def test_separator_date_conflict (all_parsers ):
95
97
# Regression test for gh-4678
96
98
#
@@ -112,6 +114,7 @@ def test_separator_date_conflict(all_parsers):
112
114
tm .assert_frame_equal (df , expected )
113
115
114
116
117
+ @xfail_pyarrow
115
118
@pytest .mark .parametrize ("keep_date_col" , [True , False ])
116
119
def test_multiple_date_col_custom (all_parsers , keep_date_col ):
117
120
data = """\
@@ -267,6 +270,7 @@ def test_concat_date_col_fail(container, dim):
267
270
parsing .concat_date_cols (date_cols )
268
271
269
272
273
+ @xfail_pyarrow
270
274
@pytest .mark .parametrize ("keep_date_col" , [True , False ])
271
275
def test_multiple_date_col (all_parsers , keep_date_col ):
272
276
data = """\
@@ -426,6 +430,7 @@ def test_date_col_as_index_col(all_parsers):
426
430
tm .assert_frame_equal (result , expected )
427
431
428
432
433
+ @xfail_pyarrow
429
434
@pytest .mark .parametrize (
430
435
"date_parser, warning" ,
431
436
([conv .parse_date_time , FutureWarning ], [pd .to_datetime , None ]),
@@ -490,6 +495,7 @@ def test_multiple_date_cols_int_cast(all_parsers, date_parser, warning):
490
495
tm .assert_frame_equal (result , expected )
491
496
492
497
498
+ @xfail_pyarrow
493
499
def test_multiple_date_col_timestamp_parse (all_parsers ):
494
500
parser = all_parsers
495
501
data = """05/31/2012,15:30:00.029,1306.25,1,E,0,,1306.25
@@ -524,6 +530,7 @@ def test_multiple_date_col_timestamp_parse(all_parsers):
524
530
tm .assert_frame_equal (result , expected )
525
531
526
532
533
+ @xfail_pyarrow
527
534
def test_multiple_date_cols_with_header (all_parsers ):
528
535
parser = all_parsers
529
536
data = """\
@@ -693,6 +700,7 @@ def test_date_parser_int_bug(all_parsers):
693
700
tm .assert_frame_equal (result , expected )
694
701
695
702
703
+ @xfail_pyarrow
696
704
def test_nat_parse (all_parsers ):
697
705
# see gh-3062
698
706
parser = all_parsers
@@ -708,6 +716,7 @@ def test_nat_parse(all_parsers):
708
716
tm .assert_frame_equal (result , df )
709
717
710
718
719
+ @xfail_pyarrow
711
720
def test_csv_custom_parser (all_parsers ):
712
721
data = """A,B,C
713
722
20090101,a,1,2
@@ -722,6 +731,7 @@ def test_csv_custom_parser(all_parsers):
722
731
tm .assert_frame_equal (result , expected )
723
732
724
733
734
+ @xfail_pyarrow
725
735
def test_parse_dates_implicit_first_col (all_parsers ):
726
736
data = """A,B,C
727
737
20090101,a,1,2
@@ -735,6 +745,7 @@ def test_parse_dates_implicit_first_col(all_parsers):
735
745
tm .assert_frame_equal (result , expected )
736
746
737
747
748
+ @xfail_pyarrow
738
749
def test_parse_dates_string (all_parsers ):
739
750
data = """date,A,B,C
740
751
20090101,a,1,2
@@ -779,6 +790,7 @@ def test_yy_format_with_year_first(all_parsers, parse_dates):
779
790
tm .assert_frame_equal (result , expected )
780
791
781
792
793
+ @xfail_pyarrow
782
794
@pytest .mark .parametrize ("parse_dates" , [[0 , 2 ], ["a" , "c" ]])
783
795
def test_parse_dates_column_list (all_parsers , parse_dates ):
784
796
data = "a,b,c\n 01/01/2010,1,15/02/2010"
@@ -795,6 +807,7 @@ def test_parse_dates_column_list(all_parsers, parse_dates):
795
807
tm .assert_frame_equal (result , expected )
796
808
797
809
810
+ @xfail_pyarrow
798
811
@pytest .mark .parametrize ("index_col" , [[0 , 1 ], [1 , 0 ]])
799
812
def test_multi_index_parse_dates (all_parsers , index_col ):
800
813
data = """index1,index2,A,B,C
@@ -840,6 +853,7 @@ def test_multi_index_parse_dates(all_parsers, index_col):
840
853
tm .assert_frame_equal (result , expected )
841
854
842
855
856
+ @xfail_pyarrow
843
857
@pytest .mark .parametrize ("kwargs" , [{"dayfirst" : True }, {"day_first" : True }])
844
858
def test_parse_dates_custom_euro_format (all_parsers , kwargs ):
845
859
parser = all_parsers
@@ -884,6 +898,7 @@ def test_parse_dates_custom_euro_format(all_parsers, kwargs):
884
898
)
885
899
886
900
901
+ @xfail_pyarrow
887
902
def test_parse_tz_aware (all_parsers ):
888
903
# See gh-1693
889
904
parser = all_parsers
@@ -897,6 +912,7 @@ def test_parse_tz_aware(all_parsers):
897
912
assert result .index .tz is pytz .utc
898
913
899
914
915
+ @xfail_pyarrow
900
916
@pytest .mark .parametrize (
901
917
"parse_dates,index_col" ,
902
918
[({"nominal" : [1 , 2 ]}, "nominal" ), ({"nominal" : [1 , 2 ]}, 0 ), ([[1 , 2 ]], 0 )],
@@ -997,6 +1013,7 @@ def test_multiple_date_cols_index(all_parsers, parse_dates, index_col):
997
1013
tm .assert_frame_equal (result , expected )
998
1014
999
1015
1016
+ @xfail_pyarrow
1000
1017
def test_multiple_date_cols_chunked (all_parsers ):
1001
1018
parser = all_parsers
1002
1019
data = """\
@@ -1089,6 +1106,7 @@ def test_multiple_date_cols_chunked(all_parsers):
1089
1106
tm .assert_frame_equal (chunks [2 ], expected [4 :])
1090
1107
1091
1108
1109
+ @xfail_pyarrow
1092
1110
def test_multiple_date_col_named_index_compat (all_parsers ):
1093
1111
parser = all_parsers
1094
1112
data = """\
@@ -1112,6 +1130,7 @@ def test_multiple_date_col_named_index_compat(all_parsers):
1112
1130
tm .assert_frame_equal (with_indices , with_names )
1113
1131
1114
1132
1133
+ @xfail_pyarrow
1115
1134
def test_multiple_date_col_multiple_index_compat (all_parsers ):
1116
1135
parser = all_parsers
1117
1136
data = """\
@@ -1179,6 +1198,7 @@ def test_bad_date_parse(all_parsers, cache_dates, value):
1179
1198
)
1180
1199
1181
1200
1201
+ @xfail_pyarrow
1182
1202
def test_parse_dates_empty_string (all_parsers ):
1183
1203
# see gh-2263
1184
1204
parser = all_parsers
@@ -1191,6 +1211,7 @@ def test_parse_dates_empty_string(all_parsers):
1191
1211
tm .assert_frame_equal (result , expected )
1192
1212
1193
1213
1214
+ @xfail_pyarrow
1194
1215
@pytest .mark .parametrize (
1195
1216
"data,kwargs,expected" ,
1196
1217
[
@@ -1230,6 +1251,7 @@ def test_parse_dates_no_convert_thousands(all_parsers, data, kwargs, expected):
1230
1251
tm .assert_frame_equal (result , expected )
1231
1252
1232
1253
1254
+ @xfail_pyarrow
1233
1255
@pytest .mark .parametrize (
1234
1256
"date_parser, warning" ,
1235
1257
([conv .parse_date_time , FutureWarning ], [pd .to_datetime , None ]),
@@ -1258,6 +1280,7 @@ def test_parse_date_time_multi_level_column_name(all_parsers, date_parser, warni
1258
1280
tm .assert_frame_equal (result , expected )
1259
1281
1260
1282
1283
+ @xfail_pyarrow
1261
1284
@pytest .mark .parametrize (
1262
1285
"date_parser, warning" ,
1263
1286
([conv .parse_date_time , FutureWarning ], [pd .to_datetime , None ]),
@@ -1346,6 +1369,7 @@ def test_parse_date_time(all_parsers, data, kwargs, expected, date_parser, warni
1346
1369
tm .assert_frame_equal (result , expected )
1347
1370
1348
1371
1372
+ @xfail_pyarrow
1349
1373
@pytest .mark .parametrize (
1350
1374
"date_parser, warning" ,
1351
1375
([conv .parse_date_fields , FutureWarning ], [pd .to_datetime , None ]),
@@ -1368,6 +1392,7 @@ def test_parse_date_fields(all_parsers, date_parser, warning):
1368
1392
tm .assert_frame_equal (result , expected )
1369
1393
1370
1394
1395
+ @xfail_pyarrow
1371
1396
@pytest .mark .parametrize (
1372
1397
"date_parser, warning" ,
1373
1398
(
@@ -1399,6 +1424,7 @@ def test_parse_date_all_fields(all_parsers, date_parser, warning):
1399
1424
tm .assert_frame_equal (result , expected )
1400
1425
1401
1426
1427
+ @xfail_pyarrow
1402
1428
@pytest .mark .parametrize (
1403
1429
"date_parser, warning" ,
1404
1430
(
@@ -1430,6 +1456,7 @@ def test_datetime_fractional_seconds(all_parsers, date_parser, warning):
1430
1456
tm .assert_frame_equal (result , expected )
1431
1457
1432
1458
1459
+ @xfail_pyarrow
1433
1460
def test_generic (all_parsers ):
1434
1461
parser = all_parsers
1435
1462
data = "year,month,day,a\n 2001,01,10,10.\n 2001,02,1,11."
@@ -1448,6 +1475,7 @@ def test_generic(all_parsers):
1448
1475
tm .assert_frame_equal (result , expected )
1449
1476
1450
1477
1478
+ @xfail_pyarrow
1451
1479
def test_date_parser_resolution_if_not_ns (all_parsers ):
1452
1480
# see gh-10245
1453
1481
parser = all_parsers
@@ -1545,6 +1573,7 @@ def test_parse_timezone(all_parsers):
1545
1573
tm .assert_frame_equal (result , expected )
1546
1574
1547
1575
1576
+ @xfail_pyarrow
1548
1577
@pytest .mark .parametrize (
1549
1578
"date_string" ,
1550
1579
["32/32/2019" , "02/30/2019" , "13/13/2019" , "13/2019" , "a3/11/2018" , "10/11/2o17" ],
@@ -1556,6 +1585,7 @@ def test_invalid_parse_delimited_date(all_parsers, date_string):
1556
1585
tm .assert_frame_equal (result , expected )
1557
1586
1558
1587
1588
+ @xfail_pyarrow
1559
1589
@pytest .mark .parametrize (
1560
1590
"date_string,dayfirst,expected" ,
1561
1591
[
@@ -1578,6 +1608,7 @@ def test_parse_delimited_date_swap_no_warning(
1578
1608
tm .assert_frame_equal (result , expected )
1579
1609
1580
1610
1611
+ @xfail_pyarrow
1581
1612
@pytest .mark .parametrize (
1582
1613
"date_string,dayfirst,expected" ,
1583
1614
[
@@ -1647,6 +1678,7 @@ def test_hypothesis_delimited_date(date_format, dayfirst, delimiter, test_dateti
1647
1678
assert result == expected
1648
1679
1649
1680
1681
+ @xfail_pyarrow
1650
1682
@pytest .mark .parametrize (
1651
1683
"names, usecols, parse_dates, missing_cols" ,
1652
1684
[
@@ -1679,6 +1711,7 @@ def test_missing_parse_dates_column_raises(
1679
1711
)
1680
1712
1681
1713
1714
+ @xfail_pyarrow
1682
1715
def test_date_parser_and_names (all_parsers ):
1683
1716
# GH#33699
1684
1717
parser = all_parsers
@@ -1688,6 +1721,7 @@ def test_date_parser_and_names(all_parsers):
1688
1721
tm .assert_frame_equal (result , expected )
1689
1722
1690
1723
1724
+ @xfail_pyarrow
1691
1725
def test_date_parser_usecols_thousands (all_parsers ):
1692
1726
# GH#39365
1693
1727
data = """A,B,C
0 commit comments