# SPDX-FileCopyrightText: 2021 Helmholtz-Zentrum für Umweltforschung GmbH - UFZ
#
# SPDX-License-Identifier: GPL-3.0-or-later

import pytest

import saqc.lib.ts_operators as tsops
import pandas as pd


def test_butterFilter():
    assert (
        tsops.butterFilter(pd.Series([1, -1] * 100), cutoff=0.1) - pd.Series([1, -1] * 100)
    ).mean() < 0.5


def test_identity():
    assert tsops.identity(99) == 99