Return a dictionary mapping property name -> value.
(self)
| 1753 | ] |
| 1754 | |
| 1755 | def properties(self): |
| 1756 | """Return a dictionary mapping property name -> value.""" |
| 1757 | o = self.oorig |
| 1758 | getters = [name for name in dir(o) |
| 1759 | if name.startswith('get_') and callable(getattr(o, name))] |
| 1760 | getters.sort() |
| 1761 | d = {} |
| 1762 | for name in getters: |
| 1763 | func = getattr(o, name) |
| 1764 | if self.is_alias(func): |
| 1765 | continue |
| 1766 | try: |
| 1767 | with warnings.catch_warnings(): |
| 1768 | warnings.simplefilter('ignore') |
| 1769 | val = func() |
| 1770 | except Exception: |
| 1771 | continue |
| 1772 | else: |
| 1773 | d[name[4:]] = val |
| 1774 | return d |
| 1775 | |
| 1776 | def pprint_getters(self): |
| 1777 | """Return the getters and actual values as list of strings.""" |
no test coverage detected