def test_Variable_eq(): var1 = Variable('test', rvalues=['a+b', 'c+d']) var2 = Variable('test', rvalues=['a+b', 'c+d']) var1.next() assert var1 == var2 assert var1.idx == 1 assert var2.idx == 0
def test_Variable_next(): var1 = Variable('test') var2 = Variable('test', rvalues=['a', 'b']) assert var1.next() is False assert var2.next() is True assert var2.next() is False assert var2.next() is False