| 229 | |
| 230 | def test_customdescriptors_with_abstractmethod(self): |
| 231 | class Descriptor: |
| 232 | def __init__(self, fget, fset=None): |
| 233 | self._fget = fget |
| 234 | self._fset = fset |
| 235 | def getter(self, callable): |
| 236 | return Descriptor(callable, self._fget) |
| 237 | def setter(self, callable): |
| 238 | return Descriptor(self._fget, callable) |
| 239 | @property |
| 240 | def __isabstractmethod__(self): |
| 241 | return (getattr(self._fget, '__isabstractmethod__', False) |
| 242 | or getattr(self._fset, '__isabstractmethod__', False)) |
| 243 | class C(metaclass=abc_ABCMeta): |
| 244 | @Descriptor |
| 245 | @abc.abstractmethod |