| Total Complexity | 5 |
| Total Lines | 13 |
| Duplicated Lines | 0 % |
| 1 | from hamcrest.core.base_matcher import BaseMatcher |
||
| 9 | class AnyOf(BaseMatcher): |
||
| 10 | |||
| 11 | def __init__(self, *matchers): |
||
| 12 | self.matchers = matchers |
||
| 13 | |||
| 14 | def _matches(self, item): |
||
| 15 | for matcher in self.matchers: |
||
| 16 | if matcher.matches(item): |
||
| 17 | return True |
||
| 18 | return False |
||
| 19 | |||
| 20 | def describe_to(self, description): |
||
| 21 | description.append_list('(', ' or ', ')', self.matchers) |
||
| 22 | |||
| 38 |