コード例 #1
0
    def test_derivative_of_term_with_coeficient_and_power_return_term_with_coeficient_equal_to_one(
            self):
        t = Term(1, 1)

        res = t.derivative()

        self.assertEqual(res, '1')
コード例 #2
0
    def test_derivative_of_term_with_coeficient_and_power_return_after_derivation(
            self):
        t = Term(2, 4)

        res = t.derivative()

        self.assertEqual(res, '8*x^3')
コード例 #3
0
    def test_derivative_of_term_with_coeficient_and_power_equal_to_zero(self):
        t = Term(5, 0)

        res = t.derivative()

        self.assertEqual(res, '0')
コード例 #4
0
    def test_derivative_of_term_with_coeficientequal_to_one(self):
        t = Term(1, 3)

        res = t.derivative()

        self.assertEqual(res, '3*x^2')