twisted.python.test.test_constants._ConstantsTestsMixin(object)
class documentationtwisted.python.test.test_constants
(View In Hierarchy)
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. |
Assert that an attempt to instantiate the constants class raises
TypeError
.
Parameters | name | A str giving the name of the constants collection. |
cls | The constants class to test. |
Assert that container._enumerants
does not change as a
side-effect of one of its attributes being accessed.
Parameters | container | A _ConstantsContainer subclass which will be tested. |
constantName | The name of one of the constants which is an attribute of
container . |