Skip to content
Snippets Groups Projects
Commit 665c1d5e authored by Michele Nottoli's avatar Michele Nottoli
Browse files

Improved test.

parent 9eabda30
Branches
Tags
1 merge request!6QTR
......@@ -12,7 +12,9 @@ SMALL = 1e-10
THRESHOLD = 1e-2
@pytest.mark.parametrize("datafile", ["urea.json", "glucose.json"])
def test_extrapolation(datafile):
@pytest.mark.parametrize("fitting", ["leastsquare", "qtr"])
@pytest.mark.parametrize("regularization", [0.0, 1e-6, 5e-6])
def test_extrapolation(datafile, fitting, regularization):
# load test data from json file
data = utils.load_json(f"tests/{datafile}")
......@@ -26,7 +28,8 @@ def test_extrapolation(datafile):
assert n < nframes
# initialize an extrapolator
extrapolator = gext.Extrapolator(nelectrons, nbasis, natoms, nsteps=n)
extrapolator = gext.Extrapolator(nelectrons, nbasis, natoms,
nsteps=n, fitting=fitting, fitting_regularization=regularization)
# load data in the extrapolator up to index n - 1
for (coords, coeff, overlap) in zip(data["trajectory"][:n],
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment