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

Method __init__

deps/protobuf/python/mox.py:79–94  ·  view source on GitHub ↗

Init exception. Args: # expected_methods: A sequence of MockMethod objects that should have been # called. expected_methods: [MockMethod] Raises: ValueError: if expected_methods contains no methods.

(self, expected_methods)

Source from the content-addressed store, hash-verified

77 """
78
79 def __init__(self, expected_methods):
80 """Init exception.
81
82 Args:
83 # expected_methods: A sequence of MockMethod objects that should have been
84 # called.
85 expected_methods: [MockMethod]
86
87 Raises:
88 ValueError: if expected_methods contains no methods.
89 """
90
91 if not expected_methods:
92 raise ValueError("There must be at least one expected method")
93 Error.__init__(self)
94 self._expected_methods = expected_methods
95
96 def __str__(self):
97 calls = "\n".join(["%3d. %s" % (i, m)

Callers

nothing calls this directly

Calls 1

__init__Method · 0.45

Tested by

no test coverage detected