Remove unused _AnyComparer class

This commit is contained in:
Stéphane Wirtel 2019-09-14 09:35:47 +02:00
parent 301d852a6c
commit 6fa0593d87
1 changed files with 0 additions and 17 deletions

View File

@ -1016,23 +1016,6 @@ class NonCallableMock(Base):
_MOCK_SIG = inspect.signature(NonCallableMock.__init__)
class _AnyComparer(list):
"""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."""
def __contains__(self, item):
for _call in self:
if len(item) != len(_call):
continue
if all([
expected == actual
for expected, actual in zip(item, _call)
]):
return True
return False
def _try_iter(obj):
if obj is None:
return obj