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

Class UnexpectedMethodCallError

deps/protobuf/python/mox.py:102–127  ·  view source on GitHub ↗

Raised when an unexpected method is called. This can occur if a method is called with incorrect parameters, or out of the specified order.

Source from the content-addressed store, hash-verified

100
101
102class UnexpectedMethodCallError(Error):
103 """Raised when an unexpected method is called.
104
105 This can occur if a method is called with incorrect parameters, or out of the
106 specified order.
107 """
108
109 def __init__(self, unexpected_method, expected):
110 """Init exception.
111
112 Args:
113 # unexpected_method: MockMethod that was called but was not at the head of
114 # the expected_method queue.
115 # expected: MockMethod or UnorderedGroup the method should have
116 # been in.
117 unexpected_method: MockMethod
118 expected: MockMethod or UnorderedGroup
119 """
120
121 Error.__init__(self)
122 self._unexpected_method = unexpected_method
123 self._expected = expected
124
125 def __str__(self):
126 return "Unexpected method call: %s. Expecting: %s" % \
127 (self._unexpected_method, self._expected)
128
129
130class UnknownMethodCallError(Error):

Callers 4

_PopNextMethodMethod · 0.85
_VerifyMethodCallMethod · 0.85
MethodCalledMethod · 0.85
MethodCalledMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected