MCPcopy Create free account
hub / github.com/apple/coremltools / GetPossibleGroup

Method GetPossibleGroup

deps/protobuf/python/mox.py:645–662  ·  view source on GitHub ↗

Returns a possible group from the end of the call queue or None if no other methods are on the stack.

(self)

Source from the content-addressed store, hash-verified

643 return not self == rhs
644
645 def GetPossibleGroup(self):
646 """Returns a possible group from the end of the call queue or None if no
647 other methods are on the stack.
648 """
649
650 # Remove this method from the tail of the queue so we can add it to a group.
651 this_method = self._call_queue.pop()
652 assert this_method == self
653
654 # Determine if the tail of the queue is a group, or just a regular ordered
655 # mock method.
656 group = None
657 try:
658 group = self._call_queue[-1]
659 except IndexError:
660 pass
661
662 return group
663
664 def _CheckAndCreateNewGroup(self, group_name, group_class):
665 """Checks if the last method (a possible group) is an instance of our

Callers 1

Calls 1

popMethod · 0.45

Tested by

no test coverage detected