From 536ee5c69381aafdfc977644b4f1e32b4bf34ad8 Mon Sep 17 00:00:00 2001 From: tovrstra Date: Sun, 28 Mar 2021 16:38:41 +0200 Subject: [PATCH] Fix coverage issues --- iodata/test/test_overlap.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/iodata/test/test_overlap.py b/iodata/test/test_overlap.py index c444bb6c..20cc30c4 100644 --- a/iodata/test/test_overlap.py +++ b/iodata/test/test_overlap.py @@ -87,6 +87,18 @@ def test_overlap_l1(): atcoords = np.zeros((1, 3)) with pytest.raises(ValueError): _ = compute_overlap(dbasis, atcoords) + obasis = MolecularBasis([], {}, 'L2') + with pytest.raises(ValueError): + _ = compute_overlap(obasis, atcoords, dbasis, atcoords) + + +def test_overlap_two_basis_exceptions(): + with path('iodata.test.data', 'hf_sto3g.fchk') as fn_fchk: + data = load_one(fn_fchk) + with pytest.raises(TypeError): + compute_overlap(data.obasis, data.atcoords, data.obasis, None) + with pytest.raises(TypeError): + compute_overlap(data.obasis, data.atcoords, None, data.atcoords) FNS_TWO_BASIS = [