Skip to content

Commit 7137dda

Browse files
committed
cleanup
1 parent ac2cb87 commit 7137dda

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

pandas/tests/dtypes/cast/test_promote.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -332,12 +332,12 @@ def test_maybe_promote_any_with_datetime64(
332332
dtype = np.dtype(any_numpy_dtype_reduced)
333333
boxed, box_dtype = box # read from parametrized fixture
334334

335-
if boxed:
335+
if boxed and box_dtype is None:
336336
if is_datetime64_dtype(dtype):
337-
if box_dtype is None and not is_datetime64_dtype(type(fill_value)):
337+
if not is_datetime64_dtype(type(fill_value)):
338338
pytest.xfail("falsely upcasts to object")
339339
else:
340-
if box_dtype is None and is_datetime64_dtype(type(fill_value)):
340+
if is_datetime64_dtype(type(fill_value)):
341341
pytest.xfail("mix of lack of upcasting, resp. wrong missing value")
342342

343343
# special case for box_dtype

0 commit comments

Comments
 (0)