Skip to content

Commit

Permalink
updated test for added comment.
Browse files Browse the repository at this point in the history
  • Loading branch information
MicahGale committed Feb 12, 2024
1 parent 8970e16 commit a9021da
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions tests/test_integration.py
Original file line number Diff line number Diff line change
Expand Up @@ -342,6 +342,7 @@ def test_cell_card_pass_through(self):
# test input pass-through
answer = [
"C cells",
"c # hidden vertical Do not touch",
"c",
"1 1 20",
" -1000 $ dollar comment",
Expand All @@ -354,20 +355,20 @@ def test_cell_card_pass_through(self):
cell = new_prob.cells[1]
output = cell.format_for_mcnp_input((6, 2, 0))
print(output)
self.assertEqual(int(output[3].split("$")[0]), -5)
self.assertEqual(int(output[4].split("$")[0]), -5)
# test mass density printer
cell.mass_density = 10.0
with self.assertWarns(LineExpansionWarning):
output = cell.format_for_mcnp_input((6, 2, 0))
print(output)
self.assertAlmostEqual(float(output[2].split()[2]), -10)
self.assertAlmostEqual(float(output[3].split()[2]), -10)
# ensure that surface number updated
# Test material number change
new_prob = copy.deepcopy(problem)
new_prob.materials[1].number = 5
cell = new_prob.cells[1]
output = cell.format_for_mcnp_input((6, 2, 0))
self.assertEqual(int(output[2].split()[1]), 5)
self.assertEqual(int(output[3].split()[1]), 5)

def test_thermal_scattering_pass_through(self):
problem = copy.deepcopy(self.simple_problem)
Expand Down

0 comments on commit a9021da

Please sign in to comment.