Skip to content

Commit

Permalink
added test to check method = None works
Browse files Browse the repository at this point in the history
  • Loading branch information
shimwell committed Jan 14, 2021
1 parent 81dac9e commit 8d5d493
Showing 1 changed file with 32 additions and 0 deletions.
32 changes: 32 additions & 0 deletions tests/test_parametric_neutronics/test_NeutronicModel.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,23 @@ def setUp(self):
self.source.space = openmc.stats.Point((0, 0, 0))
self.source.angle = openmc.stats.Isotropic()

def simulation_with_previous_h5m_file(self):
"""This performs a simulation using previously created h5m file"""

os.system('rm *.h5m')

my_model = paramak.NeutronicsModel(
geometry=self.my_shape,
source=self.source,
materials={'center_column_shield_mat': 'WC'},
)

my_model.create_neutronics_geometry(method='pymoab')

my_model.simulate(method=None)

my_model.results is not None

def test_merge_tolerance_setting_and_getting(self):
"""Makes a neutronics model and checks the default merge_tolerance"""

Expand Down Expand Up @@ -137,6 +154,21 @@ def test_incorrect_args(self):
"""Checks that an error is raised when the shape is
defined as ."""

def missing_dagmc_not_watertight_file():
"Tries to set faceting_tolerance as a string"
test_model = paramak.NeutronicsModel(
geometry=self.my_shape,
source=self.source,
materials={'center_column_shield_mat': 'eurofer'},
)

test_model._make_watertight()

self.assertRaises(
ValueError,
missing_dagmc_not_watertight_file
)

def incorrect_faceting_tolerance():
"Tries to set faceting_tolerance as a string"
paramak.NeutronicsModel(
Expand Down

0 comments on commit 8d5d493

Please sign in to comment.