(self)
| 309 | self.cannot_set_attr(self.fi.a, "__self__", self.fi, AttributeError) |
| 310 | |
| 311 | def test___func___non_method(self): |
| 312 | # Behavior should be the same when a method is added via an attr |
| 313 | # assignment |
| 314 | self.fi.id = types.MethodType(id, self.fi) |
| 315 | self.assertEqual(self.fi.id(), id(self.fi)) |
| 316 | # Test usage |
| 317 | try: |
| 318 | self.fi.id.unknown_attr |
| 319 | except AttributeError: |
| 320 | pass |
| 321 | else: |
| 322 | self.fail("using unknown attributes should raise AttributeError") |
| 323 | # Test assignment and deletion |
| 324 | self.cannot_set_attr(self.fi.id, 'unknown_attr', 2, AttributeError) |
| 325 | |
| 326 | |
| 327 | class ArbitraryFunctionAttrTest(FuncAttrsTest): |
nothing calls this directly
no test coverage detected