aboutsummaryrefslogtreecommitdiff
path: root/test/test_graphic.py
diff options
context:
space:
mode:
authorThomas Albers Raviola <thomas@thomaslabs.org>2024-07-19 17:01:54 +0200
committerThomas Albers Raviola <thomas@thomaslabs.org>2024-07-19 17:01:54 +0200
commit0d6bd534753b6cf80352e66d4f71471b9d9ff445 (patch)
tree26ad83ee49dead3d4fd377fb15dd4d1a633b3691 /test/test_graphic.py
parent9eff8ee4fbd0203ecce0b5487191f224656c82bd (diff)
parent3907db7c10c6745dda60050d21036a602f2c3570 (diff)
Merge branch 'solve'
Diffstat (limited to 'test/test_graphic.py')
-rw-r--r--test/test_graphic.py10
1 files changed, 3 insertions, 7 deletions
diff --git a/test/test_graphic.py b/test/test_graphic.py
index 73d8b82..8433cae 100644
--- a/test/test_graphic.py
+++ b/test/test_graphic.py
@@ -1,7 +1,3 @@
-from pathlib import Path
-import sys
-sys.path.insert(0, str(Path.cwd().parent/'schroedinger'))
-
import pytest
import numpy as np
@@ -18,19 +14,19 @@ v = {}
FORMS = ['asymmetric', 'double_linear', 'double_cubic']
@pytest.mark.parametrize('form', FORMS)
-def test_potential(form):
+def test_potential(form: str) -> None:
potential_prec = np.loadtxt(f'test/{form}/potential.dat')
assert np.allclose(potential[form], potential_prec, rtol=1e-2, atol=1e-2)
@pytest.mark.parametrize('form', FORMS)
-def test_e(form):
+def test_e(form: str) -> None:
e_prec = np.loadtxt(f'test/{form}/energies.dat')
assert np.allclose(e[form], e_prec, rtol=1e-2, atol=1e-2)
@pytest.mark.parametrize('form', FORMS)
-def test_v(form):
+def test_v(form: str) -> None:
v_prec = np.loadtxt(f'test/{form}/wavefuncs.dat')[:, 1:]
assert np.allclose(v[form], v_prec, rtol=1e-2, atol=1e-2)