@@ -1482,23 +1482,18 @@ def test_value_counts_with_nan(self):
1482
1482
1483
1483
@pytest .mark .parametrize (
1484
1484
"dtype" ,
1485
- [
1486
- "int_" ,
1487
- "uint" ,
1488
- "float_" ,
1489
- "unicode_" ,
1490
- "timedelta64[h]" ,
1491
- pytest .param (
1492
- "datetime64[D]" , marks = pytest .mark .xfail (reason = "GH#7996" , strict = True )
1493
- ),
1494
- ],
1485
+ ["int_" , "uint" , "float_" , "unicode_" , "timedelta64[h]" , "datetime64[D]" ],
1495
1486
)
1496
1487
def test_drop_duplicates_categorical_non_bool (self , dtype , ordered_fixture ):
1497
1488
cat_array = np .array ([1 , 2 , 3 , 4 , 5 ], dtype = np .dtype (dtype ))
1498
1489
1499
1490
# Test case 1
1500
1491
input1 = np .array ([1 , 2 , 3 , 3 ], dtype = np .dtype (dtype ))
1501
1492
tc1 = Series (Categorical (input1 , categories = cat_array , ordered = ordered_fixture ))
1493
+ if dtype == "datetime64[D]" :
1494
+ # pre-empty flaky xfail, tc1 values are seemingly-random
1495
+ if not (np .array (tc1 ) == input1 ).all ():
1496
+ pytest .xfail (reason = "GH#7996" )
1502
1497
1503
1498
expected = Series ([False , False , False , True ])
1504
1499
tm .assert_series_equal (tc1 .duplicated (), expected )
@@ -1524,6 +1519,10 @@ def test_drop_duplicates_categorical_non_bool(self, dtype, ordered_fixture):
1524
1519
# Test case 2
1525
1520
input2 = np .array ([1 , 2 , 3 , 5 , 3 , 2 , 4 ], dtype = np .dtype (dtype ))
1526
1521
tc2 = Series (Categorical (input2 , categories = cat_array , ordered = ordered_fixture ))
1522
+ if dtype == "datetime64[D]" :
1523
+ # pre-empty flaky xfail, tc2 values are seemingly-random
1524
+ if not (np .array (tc2 ) == input2 ).all ():
1525
+ pytest .xfail (reason = "GH#7996" )
1527
1526
1528
1527
expected = Series ([False , False , False , False , True , True , False ])
1529
1528
tm .assert_series_equal (tc2 .duplicated (), expected )
0 commit comments