diff --git a/pandas/_testing.py b/pandas/_testing.py index 2d74cc89b8063..cad95ca571258 100644 --- a/pandas/_testing.py +++ b/pandas/_testing.py @@ -2724,11 +2724,10 @@ class for all warnings. To check that no warning is returned, extra_warnings = [] for actual_warning in w: - if not expected_warning: - continue - expected_warning = cast(Type[Warning], expected_warning) - if issubclass(actual_warning.category, expected_warning): + if expected_warning and issubclass( + actual_warning.category, expected_warning + ): saw_warning = True if check_stacklevel and issubclass( diff --git a/pandas/tests/arithmetic/test_timedelta64.py b/pandas/tests/arithmetic/test_timedelta64.py index 092a3f0d4402f..110f55a49eea3 100644 --- a/pandas/tests/arithmetic/test_timedelta64.py +++ b/pandas/tests/arithmetic/test_timedelta64.py @@ -543,6 +543,7 @@ def test_tda_add_sub_index(self): expected = tdi - tdi tm.assert_index_equal(result, expected) + @pytest.mark.xfail(reason="GH38630", strict=False) def test_tda_add_dt64_object_array(self, box_with_array, tz_naive_fixture): # Result should be cast back to DatetimeArray box = box_with_array diff --git a/pandas/tests/frame/test_arithmetic.py b/pandas/tests/frame/test_arithmetic.py index e5ec3c5641bd2..e6d1cd5f47d8d 100644 --- a/pandas/tests/frame/test_arithmetic.py +++ b/pandas/tests/frame/test_arithmetic.py @@ -821,6 +821,7 @@ def test_frame_with_frame_reindex(self): (np.datetime64(20, "ns"), "