Skip to content

Commit

Permalink
test: fix name test
Browse files Browse the repository at this point in the history
  • Loading branch information
wcxve committed Mar 1, 2024
1 parent 6880fa6 commit edf0015
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
6 changes: 3 additions & 3 deletions tests/model/test_name.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from elisa.model.add import Powerlaw
from elisa.model.add import PowerLaw


def test_model_name():
model = Powerlaw() + Powerlaw()
assert repr(model) == "powerlaw + powerlaw2"
model = PowerLaw() + PowerLaw()
assert model.name == 'powerlaw + powerlaw_2'
8 changes: 4 additions & 4 deletions tests/parameter/test_name.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
from elisa.model.base import UniformParameter
from elisa.model.parameter import UniformParameter


def test_param_name():
a = UniformParameter("a", "a", 1.0, 0.0, 2.0)
a2 = UniformParameter("a2", "a2", 1.0, 0.0, 2.0)
a = UniformParameter('a', 1.5, 0.0, 2.0)
a2 = UniformParameter('a', 0.5, 0.0, 2.0)
b = a + a2
assert repr(b) == "a + a2"
assert str(b) == "a + a'"
assert b.default == 2.0

0 comments on commit edf0015

Please sign in to comment.