5
5
import pytest
6
6
7
7
from pandas ._libs import iNaT
8
+ from pandas .compat .numpy import _is_numpy_dev
8
9
from pandas .errors import InvalidIndexError
9
10
10
11
from pandas .core .dtypes .common import is_datetime64tz_dtype
@@ -417,7 +418,7 @@ def test_set_ops_error_cases(self, case, method, index):
417
418
with pytest .raises (TypeError , match = msg ):
418
419
getattr (index , method )(case )
419
420
420
- def test_intersection_base (self , index ):
421
+ def test_intersection_base (self , index , request ):
421
422
if isinstance (index , CategoricalIndex ):
422
423
return
423
424
@@ -434,6 +435,15 @@ def test_intersection_base(self, index):
434
435
# GH 10149
435
436
cases = [klass (second .values ) for klass in [np .array , Series , list ]]
436
437
for case in cases :
438
+ # https://github.com/pandas-dev/pandas/issues/35481
439
+ if (
440
+ _is_numpy_dev
441
+ and isinstance (case , Series )
442
+ and isinstance (index , UInt64Index )
443
+ ):
444
+ mark = pytest .mark .xfail (reason = "gh-35481" )
445
+ request .node .add_marker (mark )
446
+
437
447
result = first .intersection (case )
438
448
assert tm .equalContents (result , second )
439
449
0 commit comments