def test6(): exp6 = finitesum('2x^3+1y') assert (exp6.simplify() == '2x^3+y')
def test1(): exp = finitesum('1') assert (exp.derive('x') == '0') assert (exp.getString() == '1')
def test4(): exp4 = finitesum('2x^3+4y^2+5x^3') assert (exp4.simplify() == '7x^3+4y^2')
def test5(): exp5 = finitesum('2x^3-4y^2-5x^3') assert (exp5.simplify() == '-3x^3+-4y^2')
def test2(): exp2 = finitesum('2x^7') assert (exp2.derive('x') == '14x^6')
def test3(): exp3 = finitesum('2x+5y^7') exp3.setString('3y^2+82z') assert (exp3.getString() == '3y^2+82z')
def test2_9(): exp9 = finitesum('0') assert (exp9.simplify() == '0')
def test2_1(): exp = finitesum('2x^3y^4z^7') assert (exp.derive('y') == '8x^3y^3z^7')
def test2_7(): exp7 = finitesum('y^-4') assert (exp7.simplify() == 'y^-4')
def test2_8(): exp8 = finitesum('2x^-7-2y^-5') assert (exp8.derive('y') == '10y^-6')
def test2_6(): exp6 = finitesum('y^-4') assert (exp6.derive('y') == '-4y^-5')
def test2_5(): exp5 = finitesum('-y^6x^7') assert (exp5.derive('y') == '-6y^5x^7')
def test2_4(): exp4 = finitesum('0+x') assert (exp4.simplify() == 'x')
def test2_3(): exp3 = finitesum('y^3+2y') assert (exp3.derive('y') == '2+3y^2')
def test2_2(): exp2 = finitesum('2x^2yz^3') assert (exp2.derive('y') == '2x^2z^3')