Skip to content

Commit

Permalink
add test for saf
Browse files Browse the repository at this point in the history
  • Loading branch information
yalinli2 committed Dec 6, 2024
1 parent 6e2b64a commit 5bb5c4a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
4 changes: 4 additions & 0 deletions exposan/saf/models.py → exposan/saf/analyses/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@
for license details.
'''

'''
NOT READY FOR USE
'''

import numpy as np, pandas as pd, qsdsan as qs
from chaospy import distributions as shape
from exposan.saf import (
Expand Down
5 changes: 3 additions & 2 deletions tests/test_saf.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,10 @@ def test_saf():
# Because of different CF settings for ImpactItem with the same ID
from qsdsan.utils import clear_lca_registries
clear_lca_registries()

saf.load(configuration='baseline')
rtol = 0.01

saf.load(configuration='baseline')
saf.simulate_and_print(saf.sys)
assert_allclose(saf.get_MFSP(saf.sys), 3.95586679600505, rtol=rtol)
assert_allclose(saf.get_GWP(saf.sys), -5.394022805849971, rtol=rtol)

Expand Down

0 comments on commit 5bb5c4a

Please sign in to comment.