def test_scalar_arith(self, symsum):
        def runner(f):
            result = f(r, 1)
            assert eval('r %s 1' % op).isidentical(result)

            a = f(r, r)
            b = eval('r %s r' % op)
            assert a is b or a.isidentical(b)

            result = f(1, r)
            assert eval('1 %s r' % op).isidentical(result)

        t, r = symsum
        r = t.amount.sum()
        for op, f in self.ops.items():
            runner(f)
dataset/ETHPy150Open blaze/blaze/blaze/expr/tests/test_symbol.py/TestScalarArithmetic.test_scalar_arith/original