def test_pixel_threshold_matching() -> None:
        """Test that pixel_threshold is used as image threshold when no gt masks are available."""
        batch = ImageBatch(
            image=torch.rand(4, 3, 10, 10),
            anomaly_map=torch.rand(4, 10, 10),
            pred_score=torch.tensor([20, 40, 60, 80]),
            gt_label=torch.tensor([0, 0, 1, 1]),
        )
        pre_processor = PostProcessor(enable_threshold_matching=True)
        pre_processor.on_validation_batch_end(None, None, batch)
        pre_processor.on_validation_epoch_end(None, None)
        assert pre_processor.image_threshold == pre_processor.pixel_threshold
Test that pixel_threshold is used as image threshold when no gt masks are available.
tests/unit/post_processing/test_post_processor.py