def test_cleanup(folder_dataset: FolderDataset) -> None:
        """Tests if the temporary directory is cleaned up when the instance is deleted."""
        synthetic_dataset = SyntheticAnomalyDataset.from_dataset(folder_dataset)
        root = synthetic_dataset.root
        del synthetic_dataset
        assert not root.exists()
Tests if the temporary directory is cleaned up when the instance is deleted.
tests/unit/data/utils/test_synthetic.py