def test__str__(self): """ Tests :meth:`colour.utilities.deprecation.ObjectRenamed.__str__` method. """ self.assertIn('name', str(ObjectRenamed('name', 'new_name'))) self.assertIn('new_name', str(ObjectRenamed('name', 'new_name')))
def test__str__(self): """ Test :meth:`colour.utilities.deprecation.ObjectRenamed.__str__` method. """ self.assertIn("name", str(ObjectRenamed("name", "new_name"))) self.assertIn("new_name", str(ObjectRenamed("name", "new_name")))
def extrapolator_args(self, value): # Docstrings are omitted for documentation purposes. usage_warning( str( ObjectRenamed('Signal.extrapolator_args', 'Signal.extrapolator_kwargs'))) self.extrapolator_kwargs = value
def interpolator_args(self): # Docstrings are omitted for documentation purposes. usage_warning( str( ObjectRenamed('Signal.interpolator_args', 'Signal.interpolator_kwargs'))) return self.interpolator_kwargs
def encoding_cctf(self): # pragma: no cover # Docstrings are omitted for documentation purposes. runtime_warning( str( ObjectRenamed('RGB_Colourspace.encoding_cctf', 'RGB_Colourspace.cctf_encoding'))) return self.cctf_encoding
def illuminant(self, value): # pragma: no cover # Docstrings are omitted for documentation purposes. runtime_warning( str( ObjectRenamed('RGB_Colourspace.illuminant', 'RGB_Colourspace.whitepoint_name'))) self.whitepoint_name = value
NAME: Any = None """An non-deprecated module attribute.""" NEW_NAME: Any = None """A module attribute with a new name.""" try: sys.modules[ "colour.utilities.tests.test_deprecated" ] = deprecated( # type: ignore[assignment] sys.modules["colour.utilities.tests.test_deprecated"], { "OLD_NAME": ObjectRenamed( name=("colour.utilities.tests.test_deprecated.OLD_NAME"), new_name=("colour.utilities.tests.test_deprecated.NEW_NAME"), ), "REMOVED": ObjectRemoved( name="colour.utilities.tests.test_deprecated.REMOVED" ), }, ) except KeyError: # pragma: no cover pass del ModuleAPI del ObjectRenamed del ObjectRemoved del sys
NAME = None """ An non-deprecated module attribute. NAME : object """ NEW_NAME = None """ A module attribute with a new name. NAME : object """ sys.modules['colour.utilities.tests.test_deprecated'] = (deprecated( sys.modules['colour.utilities.tests.test_deprecated'], { 'OLD_NAME': ObjectRenamed( name='colour.utilities.tests.test_deprecated.OLD_NAME', new_name='colour.utilities.tests.test_deprecated.NEW_NAME'), 'REMOVED': ObjectRemoved(name='colour.utilities.tests.test_deprecated.REMOVED' ) })) del ModuleAPI del ObjectRenamed del ObjectRemoved del sys