def test_conflicting_shape(caplog: pytest.LogCaptureFixture) -> None:
        """Test that a warning is logged if resize shapes mismatch."""
        dataset = DummyDataset()
        model_transform = Resize((224, 224))
        augmentations = Resize((256, 256))

        with caplog.at_level(logging.WARNING):
            AnomalibDataModule._update_subset_augmentations(dataset, augmentations, model_transform=model_transform)  # noqa: SLF001
        # check if a warning was logged
        assert any(record.levelname == "WARNING" for record in caplog.records)
        assert "Conflicting resize shape" in caplog.text
        # check if augmentations were overwritten by model transform
        assert dataset.augmentations == model_transform
Test that a warning is logged if resize shapes mismatch.
tests/unit/data/datamodule/test_update_augmentations.py