| Total Complexity | 3 |
| Total Lines | 11 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | from hamcrest.core.base_matcher import BaseMatcher |
||
| 8 | class IsIn(BaseMatcher): |
||
| 9 | |||
| 10 | def __init__(self, sequence): |
||
| 11 | self.sequence = sequence |
||
| 12 | |||
| 13 | def _matches(self, item): |
||
| 14 | return item in self.sequence |
||
| 15 | |||
| 16 | def describe_to(self, description): |
||
| 17 | description.append_text('one of ') \ |
||
| 18 | .append_list('(', ', ', ')', self.sequence) |
||
| 19 | |||
| 31 |