MCPcopy Create free account
hub / github.com/FDio/vpp / assert_negative_api_retval

Method assert_negative_api_retval

test/vpp_papi_provider.py:255–265  ·  view source on GitHub ↗

Expect API failure - used with with, e.g.:: with self.vapi.assert_negative_api_retval(): self.vapi. ..

(self)

Source from the content-addressed store, hash-verified

253 return self
254
255 def assert_negative_api_retval(self):
256 """Expect API failure - used with with, e.g.::
257
258 with self.vapi.assert_negative_api_retval():
259 self.vapi.<api call expected to fail>
260
261 ..
262 """
263 self._expect_stack.append(self._expect_api_retval)
264 self._expect_api_retval = self._negative
265 return self
266
267 def assert_known_api_retval(self, retvals: list[int]):
268 """Expect API to have a certain return value used with with, e.g.::

Calls 1

appendMethod · 0.80