Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
romainsacchi committed Nov 30, 2024
1 parent 3d8dc1c commit 7601380
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion tests/test_process_ei310_cutoff.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,13 @@ def test_brightway():
assert isinstance(lca.score, float)
print(lca.score)

mclca = bw2calc.MonteCarloLCA({bw2data.Database("test1").random(): 1}, method)
try:
# uses BW2
mclca = bw2calc.MonteCarloLCA({bw2data.Database("test1").random(): 1}, method)
except AttributeError:
# uses BW25
mclca = bw2calc.LCA({bw2data.Database("test1").random(): 1}, method, use_distributions=True)

results = [next(mclca) for _ in range(10)]
assert all(isinstance(result, float) for result in results)
print(results)
Expand Down

0 comments on commit 7601380

Please sign in to comment.