def __setattr__()

in testslide/__init__.py [0:0]


    def __setattr__(self, name: str, value: Any) -> None:
        if self.__dict__.get(name) and self.__dict__[name] != value:
            raise AttributeError(
                f"Attribute {repr(name)} can not be reset.\n"
                "Resetting attribute values is not permitted as it can create "
                "confusion and taint test signal.\n"
                "You can use memoize/memoize_before instead, as they allow "
                "attributes from parent contexs to be overridden consistently "
                "by sub-contexts.\n"
                "Details and examples at the documentation: "
                "https://testslide.readthedocs.io/en/main/testslide_dsl/context_attributes_and_functions/index.html"
            )
        else:
            super(_ContextData, self).__setattr__(name, value)