Skip to content

Commit

Permalink
Fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
romainsacchi committed Feb 11, 2024
1 parent 70c30ce commit 3ef076c
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions tests/test_inventory.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ def test_fuel_blend():
"share": [0.07, 0.07, 0.07, 0.07, 0.07, 0.07],
},
},
"cng": {
"methane": {
"primary": {
"type": "methane - biomethane - sewage sludge",
"share": [1, 1, 1, 1, 1, 1],
Expand All @@ -88,8 +88,7 @@ def test_fuel_blend():
tm.fuel_blend["diesel"]["secondary"]["share"],
[0.07, 0.07, 0.07, 0.07, 0.07, 0.07],
)
assert np.allclose(tm.fuel_blend["cng"]["primary"]["share"], [1, 1, 1, 1, 1, 1])
# assert np.sum(ic.fuel_blends["cng"]["secondary"]["share"]) == 0
assert np.allclose(tm.fuel_blend["methane"]["primary"]["share"], [1, 1, 1, 1, 1, 1])

ic.calculate_impacts()

Expand Down Expand Up @@ -126,7 +125,7 @@ def test_fuel_blend():
"primary": {"type": fuels[0], "share": [1, 1, 1, 1, 1, 1]},
},
"hydrogen": {"primary": {"type": fuels[1], "share": [1, 1, 1, 1, 1, 1]}},
"cng": {"primary": {"type": fuels[2], "share": [1, 1, 1, 1, 1, 1]}},
"methane": {"primary": {"type": fuels[2], "share": [1, 1, 1, 1, 1, 1]}},
}

tm = TruckModel(array, cycle="Long haul", country="CH", fuel_blend=fb)
Expand Down

0 comments on commit 3ef076c

Please sign in to comment.