def test_polynomial_should_order_by_power(): a = Polynomial(Term(2,1),Term(3,3),Term(2,2)) assert a.p() == ' 3X3 2X2 2X1'
def test_polynomial_should_add_up_terms_with_same_power(): a =Polynomial(Term(2,1),Term(3,1)) assert a.p() == ' 5X1'
def test_polynomial_print(): a = Polynomial(Term(2,1),Term(3,2)) assert a.p() == ' 3X2 2X1'