def test_set_attr(self):
        # setting attributes only works on function objects
        self.b.known_attr = 7
        self.assertEqual(self.b.known_attr, 7)
        for func in [self.f.a, self.fi.a]:
            try:
                func.known_attr = 7
            except __HOLE__:
                pass
            else:
                self.fail("setting attributes on methods should raise error")
dataset/ETHPy150Open azoft-dev-team/imagrium/env/Lib/test/test_funcattrs.py/ArbitraryFunctionAttrTest.test_set_attr