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

Method assert_equal

test/asf/asfframework.py:994–1014  ·  view source on GitHub ↗
(self, real_value, expected_value, name_or_class=None)

Source from the content-addressed store, hash-verified

992 return result
993
994 def assert_equal(self, real_value, expected_value, name_or_class=None):
995 if name_or_class is None:
996 self.assertEqual(real_value, expected_value)
997 return
998 try:
999 msg = "Invalid %s: %d('%s') does not match expected value %d('%s')"
1000 msg = msg % (
1001 getdoc(name_or_class).strip(),
1002 real_value,
1003 str(name_or_class(real_value)),
1004 expected_value,
1005 str(name_or_class(expected_value)),
1006 )
1007 except Exception:
1008 msg = "Invalid %s: %s does not match expected value %s" % (
1009 name_or_class,
1010 real_value,
1011 expected_value,
1012 )
1013
1014 self.assertEqual(real_value, expected_value, msg)
1015
1016 def assert_in_range(self, real_value, expected_min, expected_max, name=None):
1017 if name is None:

Callers 9

validateResultsMethod · 0.45
run_vapi_cMethod · 0.45
run_vapi_cppMethod · 0.45

Calls

no outgoing calls

Tested by 6

validateResultsMethod · 0.36
run_vapi_cMethod · 0.36
run_vapi_cppMethod · 0.36