It should be easier to test these warnings using our standard `pytest.warns` approach under these changes.