try evaluate polynoms with other polynoms

This commit is contained in:
Lafrite
2014-12-22 10:13:20 +01:00
parent f6739f8c7c
commit d5d889eeb0
2 changed files with 9 additions and 1 deletions

View File

@@ -43,6 +43,10 @@ class TestPolynom(unittest.TestCase):
p = Polynom([-1])
self.assertEqual(p(3).simplified(), -1)
def test_eval_poly(self):
p = Polynom([1, 2])
self.assertEqual(p("1+h").simplified(), Polynom([3,2]))
#def test_print(self):
# p = Polynom([1,2,3])
# ans = "1 + 2 x + 3 x^2"