| Conditions | 6 |
| Total Lines | 15 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 0 |
| CRAP Score | 42 |
| Changes | 0 | ||
| 1 | import logging |
||
| 13 | def filter(self, enabled): |
||
| 14 | for name, method in self.methods: |
||
| 15 | if enabled is not None and name not in enabled: |
||
| 16 | log.debug('Method %r has been disabled', name) |
||
| 17 | continue |
||
| 18 | |||
| 19 | if not hasattr(method, 'test'): |
||
| 20 | log.warn('Method %r is missing a test() method') |
||
| 21 | continue |
||
| 22 | |||
| 23 | if not method.test(): |
||
| 24 | log.info("Method %r is not available" % name) |
||
|
|
|||
| 25 | continue |
||
| 26 | |||
| 27 | yield method |
||
| 28 | |||
| 48 |