mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-28 22:26:08 -04:00
fix zam parsing (#3484)
This commit is contained in:
parent
eb74d497d2
commit
6636b7e32b
2 changed files with 3 additions and 2 deletions
|
|
@ -607,7 +607,7 @@ def zam(name):
|
|||
|
||||
"""
|
||||
try:
|
||||
symbol, A, state = _GNDS_NAME_RE.match(name).groups()
|
||||
symbol, A, state = _GNDS_NAME_RE.fullmatch(name).groups()
|
||||
except AttributeError:
|
||||
raise ValueError(f"'{name}' does not appear to be a nuclide name in "
|
||||
"GNDS format")
|
||||
|
|
|
|||
|
|
@ -131,7 +131,8 @@ def test_zam():
|
|||
assert openmc.data.zam('Am242_m10') == (95, 242, 10)
|
||||
with pytest.raises(ValueError):
|
||||
openmc.data.zam('garbage')
|
||||
|
||||
with pytest.raises(ValueError):
|
||||
openmc.data.zam('Am242-m1')
|
||||
|
||||
def test_half_life():
|
||||
assert openmc.data.half_life('H2') is None
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue