# -*- 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)

[((218, 288), 'sktime.registry.all_estimators', 'all_estimators', ([], {'estimator_types': '"""series-annotator"""', 'return_names': '(False)'}), "(estimator_types='series-annotator', return_names=False)\n", (232, 288), False, 'from sktime.registry import all_estimators\n'), ((292, 344), 'pytest.mark.parametrize', 'pytest.mark.parametrize', (['"""Estimator"""', 'ALL_ANNOTATORS'], {}), "('Estimator', ALL_ANNOTATORS)\n", (315, 344), False, 'import pytest\n'), ((477, 505), 'sktime.utils._testing.estimator_checks._make_args', '_make_args', (['estimator', '"""fit"""'], {}), "(estimator, 'fit')\n", (487, 505), False, 'from sktime.utils._testing.estimator_checks import _make_args\n'), ((542, 574), 'sktime.utils._testing.estimator_checks._make_args', '_make_args', (['estimator', '"""predict"""'], {}), "(estimator, 'predict')\n", (552, 574), False, 'from sktime.utils._testing.estimator_checks import _make_args\n')]