Skip to content

Commit

Permalink
change test to add assembly after it has blocks
Browse files Browse the repository at this point in the history
  • Loading branch information
bsculac committed Nov 22, 2024
1 parent 85bdd01 commit b34542e
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion armi/reactor/tests/test_assemblies.py
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,6 @@ def setUp(self):
)

self.assembly = makeTestAssembly(NUM_BLOCKS, self.assemNum, r=self.r)
self.r.core.add(self.assembly)

# Use these if they are needed
self.blockParams = {
Expand Down Expand Up @@ -267,6 +266,7 @@ def setUp(self):
self.assembly.add(b)
self.blockList.append(b)

self.r.core.add(self.assembly)
self.assembly.calculateZCoords()

def test_isOnWhichSymmetryLine(self):
Expand Down Expand Up @@ -345,6 +345,12 @@ def test_moveTo(self):
cur = self.assembly.spatialLocator
self.assertEqual(cur, ref)

def test_scaleParamsWhenMoved(self):
"""Volume integrated parameters must be scaled when an assembly is placed on a core boundary."""
ref = self.r.core.spatialGrid.getLocatorFromRingAndPos(3, 10)
i, j = grids.HexGrid.getIndicesFromRingAndPos(3, 10)
locator = self.r.core.spatialGrid[i, j, 0]

def test_getName(self):
cur = self.assembly.getName()
ref = self.name
Expand Down

0 comments on commit b34542e

Please sign in to comment.