def test_get_leading_power_coefficients(self, expression_string, x0,
                                         coefficients,
                                         expected_leading_power):
     np.testing.assert_almost_equal(
         symbolic_properties.get_leading_power(expression_string,
                                               x0,
                                               coefficients=coefficients),
         expected_leading_power)
 def test_get_leading_power_nan(self, expression_string, x0):
     np.testing.assert_equal(
         symbolic_properties.get_leading_power(expression_string, x0),
         np.nan)
 def test_get_leading_power(self, expression_string, x0,
                            expected_leading_power):
     np.testing.assert_almost_equal(
         symbolic_properties.get_leading_power(expression_string, x0),
         expected_leading_power)
 def test_get_leading_power_invalid_x0(self):
     with self.assertRaisesRegex(ValueError,
                                 'x0 is expected to be 0 or inf, got 5'):
         symbolic_properties.get_leading_power('x ** 2 + x + 1', x0='5')