From 1c37c488d4d95ce6f93331869af618b2cf4cb3d0 Mon Sep 17 00:00:00 2001 From: Joshua Haberman Date: Sun, 9 Jan 2022 22:01:14 -0800 Subject: [PATCH] Refined error message. --- python/message.c | 4 ++-- python/pb_unit_tests/reflection_test_wrapper.py | 1 - 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/python/message.c b/python/message.c index 3c77828d4e..95d873ef6c 100644 --- a/python/message.c +++ b/python/message.c @@ -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 (exc_type) { PyErr_Format(exc_type, - "Protocol message %s has no field or oneof named %s.", - upb_msgdef_fullname(msgdef), name); + "Protocol message %s has no \"%s\" field.", + upb_msgdef_name(msgdef), name); } return false; } diff --git a/python/pb_unit_tests/reflection_test_wrapper.py b/python/pb_unit_tests/reflection_test_wrapper.py index f9765d5644..3eaf34d3dc 100644 --- a/python/pb_unit_tests/reflection_test_wrapper.py +++ b/python/pb_unit_tests/reflection_test_wrapper.py @@ -39,7 +39,6 @@ reflection_test.SerializationTest.testCanonicalSerializationOrder.__unittest_exp reflection_test.SerializationTest.testCanonicalSerializationOrderSameAsCpp.__unittest_expecting_failure__ = True reflection_test.SerializationTest.testFieldDataDescriptor.__unittest_expecting_failure__ = True reflection_test.SerializationTest.testFieldProperties.__unittest_expecting_failure__ = True -reflection_test.SerializationTest.testInitArgsUnknownFieldName.__unittest_expecting_failure__ = True if __name__ == '__main__': unittest.main(module=reflection_test, verbosity=2)