migrate quadrature_tests to pytest

This commit is contained in:
Martin Bubel 2023-10-10 19:50:44 +02:00
parent 97741d6b41
commit de670f8bcb

View file

@ -3,16 +3,13 @@ import numpy as np
from ..util.quad_integrate import quadgk_int, quadvgk
class QuadTests(np.testing.TestCase):
class TestQuad:
"""
test file for checking implementation of gaussian-kronrod quadrature.
we will take a function which can be integrated analytically and check if quadgk result is similar or not!
through this file we can test how numerically accurate quadrature implementation in native numpy or manual code is.
"""
def setUp(self):
pass
def test_infinite_quad(self):
def f(x):
return np.exp(-0.5 * x**2) * np.power(x, np.arange(3)[:, None])