def test_pandas_vector_equality():

    @parameterize
    def check(value, index, other_value, other_index, expected):
        """Series node value {0}/{1} == {2}/{3}: {4}"""
        # pylint: disable=W0212
        #         Access to a protected member of a client class
        this = pd.Series(value, index=pd.to_datetime(index))
        other = pd.Series(other_value, index=pd.to_datetime(other_index))
        vector = VectorEq(this)

        assert expected == vector._value_eq(other)

    yield check([], [], [], [], True)
    yield check([1], ['2013-10-15'], [], [], False)
    yield check([], [], [2], ['2013-10-15'], False)
    yield check([3], ['2013-10-15'], [3], ['2013-10-15'], True)
    yield check([4], ['2013-10-15'], [4, 5],
                ['2013-10-15', '2013-10-16'],
                False)
    yield check([4, 5], ['2013-10-15', '2013-10-16'],
                [4], ['2013-10-15'],
                False)
    yield check([6, 7, 8], ['2013-10-15', '2013-10-16', '2013-10-17'],
                [6, 7, 8], ['2013-10-15', '2013-10-16', '2013-10-17'],
                True)
    yield check([6, 7, 8], ['2013-10-15', '2013-10-16', '2013-10-17'],
                [6, 7, 8], ['2013-10-15', '2013-10-16', '2013-10-18'],
                False)
    yield check([9, np.nan], ['2013-10-15', '2013-10-16'],
                [9, np.nan], ['2013-10-15', '2013-10-16'],
                True)
    yield check([9, np.nan], ['2013-10-15', '2013-10-16'],
                [9, np.nan], ['2013-10-15', '2013-10-17'],
                False)
    yield check([9, 10], ['2013-10-15', '2013-10-16'],
                [9, np.nan], ['2013-10-15', '2013-10-16'],
                False)
Test cases for lusmu.vector.VectorEq._value_eq() with pandas Series
dataset/ETHPy150Open akaihola/lusmu/lusmu/tests/test_vector.py/test_pandas_vector_equality