Skip to content

Commit

Permalink
F
Browse files Browse the repository at this point in the history
  • Loading branch information
tobin-ford committed Sep 12, 2024
1 parent c19b86f commit c54dfe0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 13 deletions.
10 changes: 0 additions & 10 deletions pvdeg/data/O2permeation.json
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
}
7 changes: 4 additions & 3 deletions tests/test_utilities.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down Expand Up @@ -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)

Expand All @@ -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
Expand All @@ -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()

0 comments on commit c54dfe0

Please sign in to comment.