armi.utils.tests.test_flags module

Testing flags.py.

class armi.utils.tests.test_flags.ExampleFlag(init=0)[source]

Bases: Flag

FOO = <ExampleFlag.FOO: 1>
BAR = <ExampleFlag.BAR: 2>
BAZ = <ExampleFlag.BAZ: 4>
class armi.utils.tests.test_flags.TestFlag(methodName='runTest')[source]

Bases: TestCase

Tests for the utility Flag class and cohorts.

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.

test_auto()[source]

Make sure that auto() works right, and that mixing it with explicit values doesnt lead to collision.

test_extend()[source]

Ensure the set of flags can be programmatically extended.

test_collision_extension()[source]

Ensure the set of flags cannot be programmatically extended if duplicate created.

test_collision_creation()[source]

Make sure that we catch value collisions upon creation.

test_bool()[source]
test_inclusion()[source]
test_bitwise()[source]

Make sure that bitwise operators work right.

test_iteration()[source]

We want to be able to iterate over set flags.

test_hashable()[source]
test_getitem()[source]