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)
Add a comment.
dataset/ETHPy150Open akaihola/lusmu/lusmu/tests/test_vector.py/test_scalar_equality--crossover with--dataset/ETHPy150Open bolme/pyvision/src/pyvision/analysis/html_report.py/HtmlReport.comment