def test_validate_anomaly_map_invalid_shape(self) -> None:
        """Test validation of an anomaly map with invalid shape."""
        with pytest.raises(ValueError, match="Anomaly map with 3 dimensions must have 1 channel, got 2."):
            self.validator.validate_anomaly_map(torch.rand(2, 224, 224))
Test validation of an anomaly map with invalid shape.
tests/unit/data/validators/torch/test_depth.py