def test_monomial_on_first_power(self): self.assertEqual('1', get_first_derivative('x^1', 'x'))
def test_monomial_without_coeff(self): self.assertEqual('2*x', get_first_derivative('x^2', 'x'))
def test_variable_only(self): self.assertEqual('1', get_first_derivative('x', 'x'))
def test_single_integer(self): self.assertEqual('0', get_first_derivative('1', 'x'))
def test_single_monomial(self): self.assertEqual('6*y^2', get_first_derivative('2*y^3', 'y'))
def test_full_equation_with_all_cases(self): self.assertEqual( '1+3*y^2+6*y^2+6*y+24*y^3', get_first_derivative('1 + y + y^3 + 2*y^3 + 3*y^2 + 6*y^4', 'y'))