Skip to content

Commit

Permalink
Fix test_check_age_and_lifetime
Browse files Browse the repository at this point in the history
The test was confusing, as it added a nominal_value to a Sink.
This, however, did not cause an error to be raised as the error
that was tested before was first.
  • Loading branch information
p-snft committed Jul 4, 2024
1 parent 5d381b0 commit de5fd70
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tests/test_options.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,6 @@ def test_check_age_and_lifetime():
"""Check error being thrown if age > lifetime"""
msg = "A unit's age must be smaller than its expected lifetime."
with pytest.raises(AttributeError, match=msg):
solph.components.Sink(
solph.Flow(
nominal_value=solph.Investment(age=41, lifetime=40)
)

0 comments on commit de5fd70

Please sign in to comment.