def cannot_set_attr(self, obj, name, value, exceptions):
        # Helper method for other tests.
        try:
            setattr(obj, name, value)
        except exceptions:
            pass
        else:
            self.fail("shouldn't be able to set %s to %r" % (name, value))
        try:
            delattr(obj, name)
        except exceptions:
            pass
        else:
            self.fail("shouldn't be able to del %s" % name)
dataset/ETHPy150Open azoft-dev-team/imagrium/env/Lib/test/test_funcattrs.py/FuncAttrsTest.cannot_set_attr/original