def test_non_overlapping_splits(datamodule: AnomalibDataModule) -> None:
        """This test ensures that all splits are non-overlapping when split mode == from_test."""
        if datamodule.val_split_mode == "from_test":
            assert (
                len(
                    set(datamodule.test_data.samples["image_path"].values).intersection(
                        set(datamodule.train_data.samples["image_path"].values),
                    ),
                )
                == 0
            ), "Found train and test split contamination"
            assert (
                len(
                    set(datamodule.val_data.samples["image_path"].values).intersection(
                        set(datamodule.test_data.samples["image_path"].values),
                    ),
                )
                == 0
            ), "Found train and test split contamination"
This test ensures that all splits are non-overlapping when split mode == from_test.
tests/unit/data/datamodule/base/image.py