@@ -272,10 +272,6 @@ def test_maybe_promote_any_with_bool(any_numpy_dtype_reduced, box):
272272 pytest .xfail ("falsely upcasts to object" )
273273 if boxed and dtype not in (str , object ) and box_dtype is None :
274274 pytest .xfail ("falsely upcasts to object" )
275- if not boxed and dtype .kind == "M" :
276- pytest .xfail ("raises error" )
277- if not boxed and dtype .kind == "m" :
278- pytest .xfail ("raises error" )
279275
280276 # filling anything but bool with bool casts to object
281277 expected_dtype = np .dtype (object ) if dtype != bool else dtype
@@ -348,8 +344,6 @@ def test_maybe_promote_any_with_datetime64(
348344 or (box_dtype is None and is_datetime64_dtype (type (fill_value )))
349345 ):
350346 pytest .xfail ("mix of lack of upcasting, resp. wrong missing value" )
351- if not boxed and is_timedelta64_dtype (dtype ):
352- pytest .xfail ("raises error" )
353347
354348 # special case for box_dtype
355349 box_dtype = np .dtype (datetime64_dtype ) if box_dtype == "dt_dtype" else box_dtype
@@ -490,9 +484,7 @@ def test_maybe_promote_any_numpy_dtype_with_datetimetz(
490484 fill_dtype = DatetimeTZDtype (tz = tz_aware_fixture )
491485 boxed , box_dtype = box # read from parametrized fixture
492486
493- if dtype .kind == "m" and not boxed :
494- pytest .xfail ("raises error" )
495- elif dtype .kind == "M" and not boxed :
487+ if dtype .kind == "M" and not boxed :
496488 pytest .xfail ("Comes back as M8 instead of object" )
497489
498490 fill_value = pd .Series ([fill_value ], dtype = fill_dtype )[0 ]
@@ -549,8 +541,6 @@ def test_maybe_promote_any_with_timedelta64(
549541 else :
550542 if boxed and box_dtype is None and is_timedelta64_dtype (type (fill_value )):
551543 pytest .xfail ("does not upcast correctly" )
552- if not boxed and is_datetime64_dtype (dtype ):
553- pytest .xfail ("raises error" )
554544
555545 # special case for box_dtype
556546 box_dtype = np .dtype (timedelta64_dtype ) if box_dtype == "td_dtype" else box_dtype
@@ -622,9 +612,6 @@ def test_maybe_promote_any_with_string(any_numpy_dtype_reduced, string_dtype, bo
622612 fill_dtype = np .dtype (string_dtype )
623613 boxed , box_dtype = box # read from parametrized fixture
624614
625- if is_datetime_or_timedelta_dtype (dtype ) and box_dtype != object :
626- pytest .xfail ("does not upcast or raises" )
627-
628615 # create array of given dtype
629616 fill_value = "abc"
630617
@@ -678,9 +665,6 @@ def test_maybe_promote_any_with_object(any_numpy_dtype_reduced, object_dtype, bo
678665 dtype = np .dtype (any_numpy_dtype_reduced )
679666 boxed , box_dtype = box # read from parametrized fixture
680667
681- if not boxed and is_datetime_or_timedelta_dtype (dtype ):
682- pytest .xfail ("raises error" )
683-
684668 # create array of object dtype from a scalar value (i.e. passing
685669 # dtypes.common.is_scalar), which can however not be cast to int/float etc.
686670 fill_value = pd .DateOffset (1 )
0 commit comments