def test_pyfun2r_ops_power():
    from benchmark import convert2r
    code = 'x = x ** (x+1)'
    rcode = convert2r.pyfun2r(code)
    assert (rcode.replace(' ', '') == 'x<-x^(x+1)')
def test_pyfun2r_ops_inc():
    from benchmark import convert2r
    code = 'x = x[0]'
    rcode = convert2r.pyfun2r(code)
    assert (rcode.replace(' ', '') == 'x<-x[1]')
def test_pyfun2r_ops_plusminus():
    from benchmark import convert2r
    code = 'x += 100'
    rcode = convert2r.pyfun2r(code)
    assert (rcode.replace(' ', '') == 'x<-x+100')