def test_derivate_with_a_full_term(self): string = '2x6' t = Term(string) result = t.derivate() expected = '12x^5' self.assertEqual(result, expected)
def test_derivate_returns_coefficient_only_when_x_raised_to_the_power_of_1(self): string = '2x' t = Term(string) result = t.derivate() expected = '2' self.assertEqual(result, expected)