Skip to content

Commit

Permalink
MAINT: test ClassVar of BlattWeisskopfSquared
Browse files Browse the repository at this point in the history
  • Loading branch information
redeboer committed Dec 18, 2023
1 parent 7d48525 commit 6993b36
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions tests/dynamics/test_dynamics.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,18 @@ def test_max_angular_momentum(self):
(1, sp.Eq(angular_momentum, 0)),
(2 * z / (z + 1), sp.Eq(angular_momentum, 1)),
)
BlattWeisskopfSquared.max_angular_momentum = None

def test_unevaluated_expression(self):
z = sp.Symbol("z")
ff1 = BlattWeisskopfSquared(z, angular_momentum=1)
ff2 = BlattWeisskopfSquared(z, angular_momentum=2)
assert ff1.max_angular_momentum is None
assert ff2.max_angular_momentum is None
BlattWeisskopfSquared.max_angular_momentum = 3
assert ff1.max_angular_momentum is 3 # noqa: F632
assert ff2.max_angular_momentum is 3 # noqa: F632
BlattWeisskopfSquared.max_angular_momentum = None


class TestEnergyDependentWidth:
Expand Down

0 comments on commit 6993b36

Please sign in to comment.