def test_validate_image_invalid_dimensions(self) -> None:
        """Test validation of an image batch with invalid dimensions."""
        with pytest.raises(ValueError, match="Image must have 3 channels, got 32."):
            self.validator.validate_image(torch.rand(32, 224, 224))
Test validation of an image batch with invalid dimensions.
tests/unit/data/validators/torch/test_image.py