def test_extra_chunk_config_when_should_not_chunk(self):
        """Test that a ValueError is raised when should_chunk is True but chunk_config is None."""
        with self.assertRaises(ValueError) as context:
            TextPreprocessingConfig(
                should_chunk=False,
                chunk_config=TextChunkConfig(
                    split_length=100,
                    split_overlap=10,
                    split_method='word'
                )
            )
        self.assertIn("`chunk_config` must not be provided when `should_chunk` is False.", str(context.exception))
Test that a ValueError is raised when should_chunk is True but chunk_config is None.
tests/unit_tests/marqo/core/inference/api/test_preprocessing_config.py