import pytest @pytest.fixture def estimator_mock(): class EstimatorMock: @staticmethod def predict(batch): return [None for _ in batch] @staticmethod def predict_proba(batch): return [None for _ in batch] def __call__(self, batch): return self.predict(batch) return EstimatorMock()