class documentation

Mixin defining test helpers common to multiple types of constants collections.

Method _initializedOnceTest Assert that container._enumerants does not change as a side-effect of one of its attributes being accessed.
Method _notInstantiableTest Assert that an attempt to instantiate the constants class raises TypeError.
def _initializedOnceTest(self, container, constantName): (source)

Assert that container._enumerants does not change as a side-effect of one of its attributes being accessed.

Parameters
containerA _ConstantsContainer subclass which will be tested.
constantNameThe name of one of the constants which is an attribute of container.
def _notInstantiableTest(self, name, cls): (source)

Assert that an attempt to instantiate the constants class raises TypeError.

Parameters
nameA str giving the name of the constants collection.
clsThe constants class to test.