Home
last modified time | relevance | path

Searched refs:cannot_set_attr (Results 1 – 2 of 2) sorted by relevance

/external/python/cpython2/Lib/test/
Dtest_funcattrs.py16 def cannot_set_attr(self, obj, name, value, exceptions): member in FuncAttrsTest
65 self.cannot_set_attr(self.b, 'func_globals', 2, TypeError)
75 self.cannot_set_attr(f, "func_closure", c, TypeError)
97 self.cannot_set_attr(self.b, '__name__', 7, TypeError)
98 self.cannot_set_attr(self.b, 'func_name', 7, TypeError)
106 self.cannot_set_attr(self.f.a, "__name__", 'a', AttributeError)
107 self.cannot_set_attr(self.fi.a, "__name__", 'a', AttributeError)
171 self.cannot_set_attr(self.f.a, "im_class", self.f, TypeError)
172 self.cannot_set_attr(self.fi.a, "im_class", self.f, TypeError)
178 self.cannot_set_attr(self.f.b, "im_func", self.b, TypeError)
[all …]
/external/python/cpython3/Lib/test/
Dtest_funcattrs.py29 def cannot_set_attr(self, obj, name, value, exceptions): member in FuncAttrsTest
73 self.cannot_set_attr(self.b, '__globals__', 2,
84 self.cannot_set_attr(f, "__closure__", c, AttributeError)
123 self.cannot_set_attr(self.b, '__name__', 7, TypeError)
130 self.cannot_set_attr(self.fi.a, "__name__", 'a', AttributeError)
150 self.cannot_set_attr(self.b, '__qualname__', 7, TypeError)
214 self.cannot_set_attr(self.fi.a, "__class__", self.F, TypeError)
218 self.cannot_set_attr(self.fi.a, "__func__", self.F.a, AttributeError)
222 self.cannot_set_attr(self.fi.a, "__self__", self.fi, AttributeError)
237 self.cannot_set_attr(self.fi.id, 'unknown_attr', 2, AttributeError)
[all …]