A list which checks if it contains a call which may have an argument of ANY, flipping the components of item and self from their traditional locations so that ANY is guaranteed to be on the left.
| 1118 | |
| 1119 | |
| 1120 | class _AnyComparer(list): |
| 1121 | """A list which checks if it contains a call which may have an |
| 1122 | argument of ANY, flipping the components of item and self from |
| 1123 | their traditional locations so that ANY is guaranteed to be on |
| 1124 | the left.""" |
| 1125 | def __contains__(self, item): |
| 1126 | for _call in self: |
| 1127 | assert len(item) == len(_call) |
| 1128 | if all([ |
| 1129 | expected == actual |
| 1130 | for expected, actual in zip(item, _call) |
| 1131 | ]): |
| 1132 | return True |
| 1133 | return False |
| 1134 | |
| 1135 | |
| 1136 | def _try_iter(obj): |
no outgoing calls
no test coverage detected