def test_scalar_equality():

    @parameterize
    def check(value, other_value, expected):
        """Scalar node value {0} == {1}: {2}"""
        # pylint: disable=W0212
        #         Access to a protected member of a client class

        vector = VectorEq(value)
        assert expected == vector._value_eq(other_value)

    yield check(DIRTY, DIRTY, True)
    yield check(DIRTY, 0, False)
    yield check(0, 0, True)
    yield check(0, 1, False)
    yield check(0, 0.0, False)
    yield check(0, 1.0, False)
    yield check(0.0, 0.0, True)
    yield check(0.0, 1.0, False)
    yield check('a', 'a', True)
    yield check('a', 'b', False)
Test cases for lusmu.vector.VectorEq._value_eq() with Python scalars
dataset/ETHPy150Open akaihola/lusmu/lusmu/tests/test_vector.py/test_scalar_equality