mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-27 13:45:36 -04:00
added test for element and nuclide plot
This commit is contained in:
parent
b44225b3d5
commit
f34b37bb4f
1 changed files with 17 additions and 1 deletions
|
|
@ -1,5 +1,6 @@
|
|||
import openmc
|
||||
import numpy as np
|
||||
import openmc
|
||||
import pytest
|
||||
|
||||
|
||||
def test_calculate_cexs_elem_mat_sab():
|
||||
|
|
@ -25,3 +26,18 @@ def test_calculate_cexs_elem_mat_sab():
|
|||
assert len(energy_grid) > 1
|
||||
assert len(data) == 1
|
||||
assert len(data[0]) == len(energy_grid)
|
||||
|
||||
|
||||
@pytest.mark.parametrize("this, data_type", [("Li", "element"), ("Li6", "nuclide")])
|
||||
def test_calculate_cexs_with_element(this, data_type):
|
||||
|
||||
# single type (reaction)
|
||||
energy_grid, data = openmc.plotter.calculate_cexs(
|
||||
this=this, data_type=data_type, types=[205]
|
||||
)
|
||||
|
||||
assert isinstance(energy_grid, np.ndarray)
|
||||
assert isinstance(data, np.ndarray)
|
||||
assert len(energy_grid) > 1
|
||||
assert len(data) == 1
|
||||
assert len(data[0]) == len(energy_grid)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue