Refined error message.

pull/13171/head
Joshua Haberman 3 years ago
parent 8af637bcd2
commit 1c37c488d4
  1. 4
      python/message.c
  2. 1
      python/pb_unit_tests/reflection_test_wrapper.py

@ -255,8 +255,8 @@ static bool PyUpb_CMessage_LookupName(PyUpb_CMessage* self, PyObject* py_name,
if (!upb_msgdef_lookupname(msgdef, name, size, f, o)) { if (!upb_msgdef_lookupname(msgdef, name, size, f, o)) {
if (exc_type) { if (exc_type) {
PyErr_Format(exc_type, PyErr_Format(exc_type,
"Protocol message %s has no field or oneof named %s.", "Protocol message %s has no \"%s\" field.",
upb_msgdef_fullname(msgdef), name); upb_msgdef_name(msgdef), name);
} }
return false; return false;
} }

@ -39,7 +39,6 @@ reflection_test.SerializationTest.testCanonicalSerializationOrder.__unittest_exp
reflection_test.SerializationTest.testCanonicalSerializationOrderSameAsCpp.__unittest_expecting_failure__ = True reflection_test.SerializationTest.testCanonicalSerializationOrderSameAsCpp.__unittest_expecting_failure__ = True
reflection_test.SerializationTest.testFieldDataDescriptor.__unittest_expecting_failure__ = True reflection_test.SerializationTest.testFieldDataDescriptor.__unittest_expecting_failure__ = True
reflection_test.SerializationTest.testFieldProperties.__unittest_expecting_failure__ = True reflection_test.SerializationTest.testFieldProperties.__unittest_expecting_failure__ = True
reflection_test.SerializationTest.testInitArgsUnknownFieldName.__unittest_expecting_failure__ = True
if __name__ == '__main__': if __name__ == '__main__':
unittest.main(module=reflection_test, verbosity=2) unittest.main(module=reflection_test, verbosity=2)

Loading…
Cancel
Save