Total Complexity | 5 |
Total Lines | 15 |
Duplicated Lines | 0 % |
1 | __author__ = "Jon Reid" |
||
9 | class IsEqual(BaseMatcher): |
||
10 | |||
11 | def __init__(self, equals): |
||
12 | self.object = equals |
||
13 | |||
14 | def _matches(self, item): |
||
15 | return item == self.object |
||
16 | |||
17 | def describe_to(self, description): |
||
18 | nested_matcher = isinstance(self.object, Matcher) |
||
19 | if nested_matcher: |
||
20 | description.append_text('<') |
||
21 | description.append_description_of(self.object) |
||
22 | if nested_matcher: |
||
23 | description.append_text('>') |
||
24 | |||
33 |