def test_quadratic_trapz_args_kwargs():
"""
Testing if you can pass a combination of positional and keyword arguments
one case: A=2, B=-4, C=3
"""
A, B, C = 2, -4, 3
a, b = -2, 2
assert isclose(trapz(quadratic, a, b, A, B, C=C),
quad_solution(a, b, A, B, C),
rel_tol=1e-3) # not a great tolerance -- maybe should try more samples!
评论列表
文章目录