Skip to content

Commit 93c5e9c

Browse files
committed
Added a unit test.
1 parent 210bb85 commit 93c5e9c

1 file changed

Lines changed: 25 additions & 0 deletions

File tree

tests/unit/test_neutronics.py

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
import pytest
2+
3+
profile = NeutronFluxProfile(
4+
1.0, #flux
5+
"dummy-FW-mat",
6+
0.01, #1cm
7+
"dummy-BZ-mat",
8+
0.11, #10cm thick blanket
9+
n_groups=2,
10+
)
11+
def test_has_fluxes():
12+
assert hasattr(profile, "neutron_flux_at")
13+
assert hasattr(profile, "groupwise_neutron_flux_at")
14+
assert hasattr(profile, "neutron_flux_fw")
15+
assert hasattr(profile, "groupwise_neutron_flux_fw")
16+
assert hasattr(profile, "neutron_flux_bz")
17+
assert hasattr(profile, "groupwise_neutron_flux_bz")
18+
19+
def test_reactions():
20+
assert hasattr(profile, "groupwise_reaction_rate_fw")
21+
assert hasattr(profile, "reaction_rate_fw")
22+
assert hasattr(profile, "groupwise_reaction_rate_bz")
23+
assert hasattr(profile, "reaction_rate_bz")
24+
assert hasattr(profile, "flux_fw2bz")
25+
assert hasattr(profile, "flux_escaped")

0 commit comments

Comments
 (0)