Known subclasses: twisted.python.test.test_constants.FlagsTests, twisted.python.test.test_constants.NamesTests, twisted.python.test.test_constants.ValuesTests

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

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

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

ParametersnameA str giving the name of the constants collection.
clsThe constants class to test.
def _initializedOnceTest(self, container, constantName):

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

ParameterscontainerA _ConstantsContainer subclass which will be tested.
constantNameThe name of one of the constants which is an attribute of container.
API Documentation for twisted, generated by pydoctor at 2020-03-25 17:34:30.