From 665c1d5e9c7c51c394827cef20117f947732bde7 Mon Sep 17 00:00:00 2001
From: Michele Nottoli <michele.nottoli@gmail.com>
Date: Tue, 7 Nov 2023 14:47:41 +0100
Subject: [PATCH] Improved test.

---
 tests/test_extrapolation.py | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/tests/test_extrapolation.py b/tests/test_extrapolation.py
index a727c4c..c8d2f91 100644
--- a/tests/test_extrapolation.py
+++ b/tests/test_extrapolation.py
@@ -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],
-- 
GitLab