@@ -678,24 +678,16 @@ def test_maybe_promote_any_numpy_dtype_with_na(
678
678
dtype = np .dtype (any_numpy_dtype_reduced )
679
679
boxed , box_dtype = box # read from parametrized fixture
680
680
681
- if (
682
- dtype == bytes
683
- and not boxed
684
- and fill_value is not None
685
- and fill_value is not NaT
686
- ):
687
- pytest .xfail ("does not upcast to object" )
688
- elif dtype == "uint64" and not boxed and fill_value == iNaT :
689
- pytest .xfail ("does not upcast correctly" )
690
- # below: opinionated that iNaT should be interpreted as missing value
691
- elif (
692
- not boxed
693
- and (is_float_dtype (dtype ) or is_complex_dtype (dtype ))
694
- and fill_value == iNaT
695
- ):
696
- pytest .xfail ("does not cast to missing value marker correctly" )
697
- elif (is_string_dtype (dtype ) or dtype == bool ) and not boxed and fill_value == iNaT :
698
- pytest .xfail ("does not cast to missing value marker correctly" )
681
+ if not boxed :
682
+ if dtype == bytes and fill_value is not None and fill_value is not NaT :
683
+ pytest .xfail ("does not upcast to object" )
684
+ elif dtype == "uint64" and fill_value == iNaT :
685
+ pytest .xfail ("does not upcast correctly" )
686
+ # below: opinionated that iNaT should be interpreted as missing value
687
+ elif (is_float_dtype (dtype ) or is_complex_dtype (dtype )) and fill_value == iNaT :
688
+ pytest .xfail ("does not cast to missing value marker correctly" )
689
+ elif (is_string_dtype (dtype ) or dtype == bool ) and fill_value == iNaT :
690
+ pytest .xfail ("does not cast to missing value marker correctly" )
699
691
700
692
if is_integer_dtype (dtype ) and dtype == "uint64" and fill_value == iNaT :
701
693
# uint64 + negative int casts to object; iNaT is considered as missing
0 commit comments