mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-28 06:05:58 -04:00
added test to check decimal values fail
This commit is contained in:
parent
605b3eade1
commit
5fe6576a9c
1 changed files with 5 additions and 0 deletions
|
|
@ -92,6 +92,11 @@ def test_adding_elements_by_formula():
|
|||
for nuclide in ref_dens:
|
||||
assert nuc_dens[nuclide][1] == pytest.approx(ref_dens[nuclide], 1e-2)
|
||||
|
||||
# testing non integer multiplier results in a value error
|
||||
m = openmc.Material()
|
||||
with pytest.raises(ValueError):
|
||||
m.add_elements_from_formula('Li4.2SiO4')
|
||||
|
||||
# testing lowercase elements results in a value error
|
||||
m = openmc.Material()
|
||||
with pytest.raises(ValueError):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue