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

Method assert_zero_api_retval

test/vpp_papi_provider.py:280–289  ·  view source on GitHub ↗

Expect API success - used with with, e.g.:: with self.vapi.assert_negative_api_retval(): self.vapi. :note: this is useful only inside another with block as success is the default expected value

(self)

Source from the content-addressed store, hash-verified

278 return self
279
280 def assert_zero_api_retval(self):
281 """Expect API success - used with with, e.g.::
282
283 with self.vapi.assert_negative_api_retval():
284 self.vapi.<api call expected to succeed>
285
286 :note: this is useful only inside another with block
287 as success is the default expected value
288 """
289 return self.assert_known_api_retval(retvals=[0])
290
291 def __exit__(self, exc_type, exc_value, traceback):
292 self._expect_api_retval = self._expect_stack.pop()

Callers

nothing calls this directly

Calls 1

Tested by

no test coverage detected