# -*- coding: utf-8 -*-
"""Tests for sktime annotators."""

import pandas as pd
import pytest

from sktime.registry import all_estimators
from sktime.utils._testing.estimator_checks import _make_args

ALL_ANNOTATORS = all_estimators(estimator_types="series-annotator", return_names=False)


@pytest.mark.parametrize("Estimator", ALL_ANNOTATORS)
def test_output_type(Estimator):
    """Test annotator output type."""
    estimator = Estimator.create_test_instance()

    args = _make_args(estimator, "fit")
    estimator.fit(*args)
    args = _make_args(estimator, "predict")
    y_pred = estimator.predict(*args)
    assert isinstance(y_pred, pd.Series)

[((10, 17, 10, 87), 'sktime.registry.all_estimators', 'all_estimators', (), '', False, 'from sktime.registry import all_estimators\n'), ((13, 1, 13, 53), 'pytest.mark.parametrize', 'pytest.mark.parametrize', ({(13, 25, 13, 36): '"""Estimator"""', (13, 38, 13, 52): 'ALL_ANNOTATORS'}, {}), "('Estimator', ALL_ANNOTATORS)", False, 'import pytest\n'), ((18, 11, 18, 39), 'sktime.utils._testing.estimator_checks._make_args', '_make_args', ({(18, 22, 18, 31): 'estimator', (18, 33, 18, 38): '"""fit"""'}, {}), "(estimator, 'fit')", False, 'from sktime.utils._testing.estimator_checks import _make_args\n'), ((20, 11, 20, 43), 'sktime.utils._testing.estimator_checks._make_args', '_make_args', ({(20, 22, 20, 31): 'estimator', (20, 33, 20, 42): '"""predict"""'}, {}), "(estimator, 'predict')", False, 'from sktime.utils._testing.estimator_checks import _make_args\n')]