From c54dfe0a441c8d349076cd966cbdb91554f029c7 Mon Sep 17 00:00:00 2001 From: tobin-ford Date: Thu, 12 Sep 2024 17:16:35 -0600 Subject: [PATCH] F --- pvdeg/data/O2permeation.json | 10 ---------- tests/test_utilities.py | 7 ++++--- 2 files changed, 4 insertions(+), 13 deletions(-) diff --git a/pvdeg/data/O2permeation.json b/pvdeg/data/O2permeation.json index 742962d..9ecc24d 100644 --- a/pvdeg/data/O2permeation.json +++ b/pvdeg/data/O2permeation.json @@ -174,15 +174,5 @@ "So": 0.00148313008211379, "Eap": 39.2779774417758, "Po": 12931378.0376762 - }, - "tmat": { - "alias": "test_material", - "Fickian": true, - "Ead": 1, - "Do": 1, - "Eas": 1, - "So": 1, - "Eap": 1, - "Po": 1 } } \ No newline at end of file diff --git a/tests/test_utilities.py b/tests/test_utilities.py index b4a2a4b..cd80552 100644 --- a/tests/test_utilities.py +++ b/tests/test_utilities.py @@ -82,7 +82,7 @@ def test_get_kinetics_bad(): def test_read_material_bad(): # no name case - fpath = os.path.join(DATA_DIR, "materials.json") + fpath = os.path.join(DATA_DIR, "O2permeation.json") with open(fpath) as f: data = json.load(f) @@ -110,7 +110,7 @@ def test_add_material(): pvdeg.utilities._add_material(name="tmat", **new_mat) # read updated file - fpath = os.path.join(DATA_DIR, "materials.json") + fpath = os.path.join(DATA_DIR, "O2permeation.json") with open(fpath) as f: data = json.load(f) @@ -122,7 +122,7 @@ def test_add_material(): assert data["tmat"] == new_mat # restore file to original state - fpath = os.path.join(DATA_DIR, "materials.json") + fpath = os.path.join(DATA_DIR, "O2permeation.json") with open(fpath) as f: data = json.load(f) data.pop("tmat") # reset to default state @@ -133,5 +133,6 @@ def test_add_material(): # this only works because we are not running on kestrel def test_nrel_kestrel_check_bad(): + with pytest.raises(ConnectionError): pvdeg.utilities.nrel_kestrel_check()