armi.utils.tests.test_hexagon module

Test hexagon tools.

class armi.utils.tests.test_hexagon.TestHexagon(methodName='runTest')[source]

Bases: TestCase

Create an instance of the class that will use the named test method when executed. Raises a ValueError if the instance does not have a method with the specified name.

N_FUZZY_DRAWS: int = 10

Number of random draws to use in some fuzzy testing

test_hexagon_area()[source]

Area of a hexagon.

test_numPositionsInRing()[source]

Calculate number of positions in a ring of hexagons.

test_rotatedCellCenter()[source]

Test that location of the center cell is invariant through rotation.

test_rotatedFirstRing()[source]

Simple test for the corners of the first ring are maintained during rotation.

test_rotateFuzzy()[source]

Select some position number and rotation and check for consistency.

test_positionsUpToRing()[source]

Test totalPositionsUpToRing is consistent with numPositionsInRing.

test_rotatedCellIndexErrors()[source]

Test errors for non-positive initial cell indices during rotation.

test_rotatedCellOrientationErrors()[source]

Test errors for invalid orientation numbers during rotation.

test_indexWithNoRotation()[source]

Test that the initial cell location is returned if not rotated.