unknown_fields_test.py
Go to the documentation of this file.
1 #! /usr/bin/env python
2 # -*- coding: utf-8 -*-
3 #
4 # Protocol Buffers - Google's data interchange format
5 # Copyright 2008 Google Inc. All rights reserved.
6 # https://developers.google.com/protocol-buffers/
7 #
8 # Redistribution and use in source and binary forms, with or without
9 # modification, are permitted provided that the following conditions are
10 # met:
11 #
12 # * Redistributions of source code must retain the above copyright
13 # notice, this list of conditions and the following disclaimer.
14 # * Redistributions in binary form must reproduce the above
15 # copyright notice, this list of conditions and the following disclaimer
16 # in the documentation and/or other materials provided with the
17 # distribution.
18 # * Neither the name of Google Inc. nor the names of its
19 # contributors may be used to endorse or promote products derived from
20 # this software without specific prior written permission.
21 #
22 # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
23 # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
24 # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
25 # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
26 # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
27 # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
28 # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
29 # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
30 # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
31 # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
32 # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
33 
34 """Test for preservation of unknown fields in the pure Python implementation."""
35 
36 __author__ = 'bohdank@google.com (Bohdan Koval)'
37 
38 try:
39  import unittest2 as unittest #PY26
40 except ImportError:
41  import unittest
42 from google.protobuf import map_unittest_pb2
43 from google.protobuf import unittest_mset_pb2
44 from google.protobuf import unittest_pb2
45 from google.protobuf import unittest_proto3_arena_pb2
46 from google.protobuf.internal import api_implementation
47 from google.protobuf.internal import encoder
48 from google.protobuf.internal import message_set_extensions_pb2
49 from google.protobuf.internal import missing_enum_values_pb2
50 from google.protobuf.internal import test_util
51 from google.protobuf.internal import testing_refleaks
52 from google.protobuf.internal import type_checkers
53 from google.protobuf import descriptor
54 
55 
56 @testing_refleaks.TestCase
57 class UnknownFieldsTest(unittest.TestCase):
58 
59  def setUp(self):
60  self.descriptor = unittest_pb2.TestAllTypes.DESCRIPTOR
61  self.all_fields = unittest_pb2.TestAllTypes()
62  test_util.SetAllFields(self.all_fields)
64  self.empty_message = unittest_pb2.TestEmptyMessage()
66 
67  def testSerialize(self):
68  data = self.empty_message.SerializeToString()
69 
70  # Don't use assertEqual because we don't want to dump raw binary data to
71  # stdout.
72  self.assertTrue(data == self.all_fields_data)
73 
75  # Verify proto3 unknown fields behavior.
76  message = unittest_proto3_arena_pb2.TestEmptyMessage()
77  message.ParseFromString(self.all_fields_data)
78  self.assertEqual(self.all_fields_data, message.SerializeToString())
79 
80  def testByteSize(self):
81  self.assertEqual(self.all_fields.ByteSize(), self.empty_message.ByteSize())
82 
83  def testListFields(self):
84  # Make sure ListFields doesn't return unknown fields.
85  self.assertEqual(0, len(self.empty_message.ListFields()))
86 
88  # Create a message using the message set wire format with an unknown
89  # message.
90  raw = unittest_mset_pb2.RawMessageSet()
91 
92  # Add an unknown extension.
93  item = raw.item.add()
94  item.type_id = 98418603
95  message1 = message_set_extensions_pb2.TestMessageSetExtension1()
96  message1.i = 12345
97  item.message = message1.SerializeToString()
98 
99  serialized = raw.SerializeToString()
100 
101  # Parse message using the message set wire format.
102  proto = message_set_extensions_pb2.TestMessageSet()
103  proto.MergeFromString(serialized)
104 
105  # Verify that the unknown extension is serialized unchanged
106  reserialized = proto.SerializeToString()
107  new_raw = unittest_mset_pb2.RawMessageSet()
108  new_raw.MergeFromString(reserialized)
109  self.assertEqual(raw, new_raw)
110 
111  def testEquals(self):
112  message = unittest_pb2.TestEmptyMessage()
113  message.ParseFromString(self.all_fields_data)
114  self.assertEqual(self.empty_message, message)
115 
116  self.all_fields.ClearField('optional_string')
117  message.ParseFromString(self.all_fields.SerializeToString())
118  self.assertNotEqual(self.empty_message, message)
119 
122  self.assertEqual(b'', self.empty_message.SerializeToString())
123  # Test message field and repeated message field.
124  message = unittest_pb2.TestAllTypes()
125  other_message = unittest_pb2.TestAllTypes()
126  other_message.optional_string = 'discard'
127  message.optional_nested_message.ParseFromString(
128  other_message.SerializeToString())
129  message.repeated_nested_message.add().ParseFromString(
130  other_message.SerializeToString())
131  self.assertNotEqual(
132  b'', message.optional_nested_message.SerializeToString())
133  self.assertNotEqual(
134  b'', message.repeated_nested_message[0].SerializeToString())
135  message.DiscardUnknownFields()
136  self.assertEqual(b'', message.optional_nested_message.SerializeToString())
137  self.assertEqual(
138  b'', message.repeated_nested_message[0].SerializeToString())
139 
140  msg = map_unittest_pb2.TestMap()
141  msg.map_int32_all_types[1].optional_nested_message.ParseFromString(
142  other_message.SerializeToString())
143  msg.map_string_string['1'] = 'test'
144  self.assertNotEqual(
145  b'',
146  msg.map_int32_all_types[1].optional_nested_message.SerializeToString())
147  msg.DiscardUnknownFields()
148  self.assertEqual(
149  b'',
150  msg.map_int32_all_types[1].optional_nested_message.SerializeToString())
151 
152 
153 @testing_refleaks.TestCase
154 class UnknownFieldsAccessorsTest(unittest.TestCase):
155 
156  def setUp(self):
157  self.descriptor = unittest_pb2.TestAllTypes.DESCRIPTOR
158  self.all_fields = unittest_pb2.TestAllTypes()
159  test_util.SetAllFields(self.all_fields)
161  self.empty_message = unittest_pb2.TestEmptyMessage()
163 
164  # InternalCheckUnknownField() is an additional Pure Python check which checks
165  # a detail of unknown fields. It cannot be used by the C++
166  # implementation because some protect members are called.
167  # The test is added for historical reasons. It is not necessary as
168  # serialized string is checked.
169  # TODO(jieluo): Remove message._unknown_fields.
170  def InternalCheckUnknownField(self, name, expected_value):
171  if api_implementation.Type() == 'cpp':
172  return
173  field_descriptor = self.descriptor.fields_by_name[name]
174  wire_type = type_checkers.FIELD_TYPE_TO_WIRE_TYPE[field_descriptor.type]
175  field_tag = encoder.TagBytes(field_descriptor.number, wire_type)
176  result_dict = {}
177  for tag_bytes, value in self.empty_message._unknown_fields:
178  if tag_bytes == field_tag:
179  decoder = unittest_pb2.TestAllTypes._decoders_by_tag[tag_bytes][0]
180  decoder(memoryview(value), 0, len(value), self.all_fields, result_dict)
181  self.assertEqual(expected_value, result_dict[field_descriptor])
182 
183  def CheckUnknownField(self, name, unknown_fields, expected_value):
184  field_descriptor = self.descriptor.fields_by_name[name]
185  expected_type = type_checkers.FIELD_TYPE_TO_WIRE_TYPE[
186  field_descriptor.type]
187  for unknown_field in unknown_fields:
188  if unknown_field.field_number == field_descriptor.number:
189  self.assertEqual(expected_type, unknown_field.wire_type)
190  if expected_type == 3:
191  # Check group
192  self.assertEqual(expected_value[0],
193  unknown_field.data[0].field_number)
194  self.assertEqual(expected_value[1], unknown_field.data[0].wire_type)
195  self.assertEqual(expected_value[2], unknown_field.data[0].data)
196  continue
197  if field_descriptor.label == descriptor.FieldDescriptor.LABEL_REPEATED:
198  self.assertIn(unknown_field.data, expected_value)
199  else:
200  self.assertEqual(expected_value, unknown_field.data)
201 
203  unknown_fields = self.empty_message.UnknownFields()
204  # Test enum.
205  self.CheckUnknownField('optional_nested_enum',
206  unknown_fields,
207  self.all_fields.optional_nested_enum)
208  self.InternalCheckUnknownField('optional_nested_enum',
209  self.all_fields.optional_nested_enum)
210 
211  # Test repeated enum.
212  self.CheckUnknownField('repeated_nested_enum',
213  unknown_fields,
214  self.all_fields.repeated_nested_enum)
215  self.InternalCheckUnknownField('repeated_nested_enum',
216  self.all_fields.repeated_nested_enum)
217 
218  # Test varint.
219  self.CheckUnknownField('optional_int32',
220  unknown_fields,
221  self.all_fields.optional_int32)
222  self.InternalCheckUnknownField('optional_int32',
223  self.all_fields.optional_int32)
224 
225  # Test fixed32.
226  self.CheckUnknownField('optional_fixed32',
227  unknown_fields,
228  self.all_fields.optional_fixed32)
229  self.InternalCheckUnknownField('optional_fixed32',
230  self.all_fields.optional_fixed32)
231 
232  # Test fixed64.
233  self.CheckUnknownField('optional_fixed64',
234  unknown_fields,
235  self.all_fields.optional_fixed64)
236  self.InternalCheckUnknownField('optional_fixed64',
237  self.all_fields.optional_fixed64)
238 
239  # Test lengthd elimited.
240  self.CheckUnknownField('optional_string',
241  unknown_fields,
242  self.all_fields.optional_string.encode('utf-8'))
243  self.InternalCheckUnknownField('optional_string',
244  self.all_fields.optional_string)
245 
246  # Test group.
247  self.CheckUnknownField('optionalgroup',
248  unknown_fields,
249  (17, 0, 117))
250  self.InternalCheckUnknownField('optionalgroup',
251  self.all_fields.optionalgroup)
252 
253  self.assertEqual(97, len(unknown_fields))
254 
255  def testCopyFrom(self):
256  message = unittest_pb2.TestEmptyMessage()
257  message.CopyFrom(self.empty_message)
258  self.assertEqual(message.SerializeToString(), self.all_fields_data)
259 
260  def testMergeFrom(self):
261  message = unittest_pb2.TestAllTypes()
262  message.optional_int32 = 1
263  message.optional_uint32 = 2
264  source = unittest_pb2.TestEmptyMessage()
265  source.ParseFromString(message.SerializeToString())
266 
267  message.ClearField('optional_int32')
268  message.optional_int64 = 3
269  message.optional_uint32 = 4
270  destination = unittest_pb2.TestEmptyMessage()
271  unknown_fields = destination.UnknownFields()
272  self.assertEqual(0, len(unknown_fields))
273  destination.ParseFromString(message.SerializeToString())
274  # ParseFromString clears the message thus unknown fields is invalid.
275  with self.assertRaises(ValueError) as context:
276  len(unknown_fields)
277  self.assertIn('UnknownFields does not exist.',
278  str(context.exception))
279  unknown_fields = destination.UnknownFields()
280  self.assertEqual(2, len(unknown_fields))
281  destination.MergeFrom(source)
282  self.assertEqual(4, len(unknown_fields))
283  # Check that the fields where correctly merged, even stored in the unknown
284  # fields set.
285  message.ParseFromString(destination.SerializeToString())
286  self.assertEqual(message.optional_int32, 1)
287  self.assertEqual(message.optional_uint32, 2)
288  self.assertEqual(message.optional_int64, 3)
289 
290  def testClear(self):
291  unknown_fields = self.empty_message.UnknownFields()
292  self.empty_message.Clear()
293  # All cleared, even unknown fields.
294  self.assertEqual(self.empty_message.SerializeToString(), b'')
295  with self.assertRaises(ValueError) as context:
296  len(unknown_fields)
297  self.assertIn('UnknownFields does not exist.',
298  str(context.exception))
299 
301  message = unittest_pb2.TestAllTypes()
302  message.optionalgroup.a = 123
303  destination = unittest_pb2.TestEmptyMessage()
304  destination.ParseFromString(message.SerializeToString())
305  sub_unknown_fields = destination.UnknownFields()[0].data
306  self.assertEqual(1, len(sub_unknown_fields))
307  self.assertEqual(sub_unknown_fields[0].data, 123)
308  destination.Clear()
309  with self.assertRaises(ValueError) as context:
310  len(sub_unknown_fields)
311  self.assertIn('UnknownFields does not exist.',
312  str(context.exception))
313  with self.assertRaises(ValueError) as context:
314  # pylint: disable=pointless-statement
315  sub_unknown_fields[0]
316  self.assertIn('UnknownFields does not exist.',
317  str(context.exception))
318  message.Clear()
319  message.optional_uint32 = 456
320  nested_message = unittest_pb2.NestedTestAllTypes()
321  nested_message.payload.optional_nested_message.ParseFromString(
322  message.SerializeToString())
323  unknown_fields = (
324  nested_message.payload.optional_nested_message.UnknownFields())
325  self.assertEqual(unknown_fields[0].data, 456)
326  nested_message.ClearField('payload')
327  self.assertEqual(unknown_fields[0].data, 456)
328  unknown_fields = (
329  nested_message.payload.optional_nested_message.UnknownFields())
330  self.assertEqual(0, len(unknown_fields))
331 
332  def testUnknownField(self):
333  message = unittest_pb2.TestAllTypes()
334  message.optional_int32 = 123
335  destination = unittest_pb2.TestEmptyMessage()
336  destination.ParseFromString(message.SerializeToString())
337  unknown_field = destination.UnknownFields()[0]
338  destination.Clear()
339  with self.assertRaises(ValueError) as context:
340  unknown_field.data # pylint: disable=pointless-statement
341  self.assertIn('The parent message might be cleared.',
342  str(context.exception))
343 
345  message = unittest_pb2.TestEmptyMessageWithExtensions()
346  message.ParseFromString(self.all_fields_data)
347  self.assertEqual(message.SerializeToString(), self.all_fields_data)
348 
349 
350 @testing_refleaks.TestCase
351 class UnknownEnumValuesTest(unittest.TestCase):
352 
353  def setUp(self):
354  self.descriptor = missing_enum_values_pb2.TestEnumValues.DESCRIPTOR
355 
356  self.message = missing_enum_values_pb2.TestEnumValues()
357  # TestEnumValues.ZERO = 0, but does not exist in the other NestedEnum.
358  self.message.optional_nested_enum = (
359  missing_enum_values_pb2.TestEnumValues.ZERO)
360  self.message.repeated_nested_enum.extend([
361  missing_enum_values_pb2.TestEnumValues.ZERO,
362  missing_enum_values_pb2.TestEnumValues.ONE,
363  ])
364  self.message.packed_nested_enum.extend([
365  missing_enum_values_pb2.TestEnumValues.ZERO,
366  missing_enum_values_pb2.TestEnumValues.ONE,
367  ])
369  self.missing_message = missing_enum_values_pb2.TestMissingEnumValues()
371 
372  # CheckUnknownField() is an additional Pure Python check which checks
373  # a detail of unknown fields. It cannot be used by the C++
374  # implementation because some protect members are called.
375  # The test is added for historical reasons. It is not necessary as
376  # serialized string is checked.
377 
378  def CheckUnknownField(self, name, expected_value):
379  field_descriptor = self.descriptor.fields_by_name[name]
380  unknown_fields = self.missing_message.UnknownFields()
381  for field in unknown_fields:
382  if field.field_number == field_descriptor.number:
383  if field_descriptor.label == descriptor.FieldDescriptor.LABEL_REPEATED:
384  self.assertIn(field.data, expected_value)
385  else:
386  self.assertEqual(expected_value, field.data)
387 
389  just_string = missing_enum_values_pb2.JustString()
390  just_string.dummy = 'blah'
391 
392  missing = missing_enum_values_pb2.TestEnumValues()
393  # The parse is invalid, storing the string proto into the set of
394  # unknown fields.
395  missing.ParseFromString(just_string.SerializeToString())
396 
397  # Fetching the enum field shouldn't crash, instead returning the
398  # default value.
399  self.assertEqual(missing.optional_nested_enum, 0)
400 
402  self.assertFalse(self.missing_message.HasField('optional_nested_enum'))
403  self.assertEqual(self.missing_message.optional_nested_enum, 2)
404  # Clear does not do anything.
405  serialized = self.missing_message.SerializeToString()
406  self.missing_message.ClearField('optional_nested_enum')
407  self.assertEqual(self.missing_message.SerializeToString(), serialized)
408 
410  self.assertEqual([], self.missing_message.repeated_nested_enum)
411 
413  self.assertEqual([], self.missing_message.packed_nested_enum)
414 
416  self.CheckUnknownField('optional_nested_enum',
417  self.message.optional_nested_enum)
418  self.CheckUnknownField('repeated_nested_enum',
419  self.message.repeated_nested_enum)
420  self.CheckUnknownField('packed_nested_enum',
421  self.message.packed_nested_enum)
422 
423  def testRoundTrip(self):
424  new_message = missing_enum_values_pb2.TestEnumValues()
425  new_message.ParseFromString(self.missing_message.SerializeToString())
426  self.assertEqual(self.message, new_message)
427 
428 
429 if __name__ == '__main__':
430  unittest.main()
google::protobuf.internal.unknown_fields_test.UnknownFieldsAccessorsTest.testClear
def testClear(self)
Definition: unknown_fields_test.py:290
google::protobuf.internal.unknown_fields_test.UnknownFieldsTest.testSerializeMessageSetWireFormatUnknownExtension
def testSerializeMessageSetWireFormatUnknownExtension(self)
Definition: unknown_fields_test.py:87
google::protobuf.internal.unknown_fields_test.UnknownFieldsAccessorsTest.setUp
def setUp(self)
Definition: unknown_fields_test.py:156
google::protobuf.internal.python_message.DiscardUnknownFields
DiscardUnknownFields
Definition: python_message.py:1433
google::protobuf.internal.unknown_fields_test.UnknownFieldsAccessorsTest.all_fields_data
all_fields_data
Definition: unknown_fields_test.py:160
google::protobuf.internal.unknown_fields_test.UnknownEnumValuesTest.testCheckUnknownFieldValueForEnum
def testCheckUnknownFieldValueForEnum(self)
Definition: unknown_fields_test.py:415
google::protobuf.internal.unknown_fields_test.UnknownFieldsTest.testListFields
def testListFields(self)
Definition: unknown_fields_test.py:83
google::protobuf
Definition: data_proto2_to_proto3_util.h:12
google::protobuf.internal.unknown_fields_test.UnknownFieldsTest.testDiscardUnknownFields
def testDiscardUnknownFields(self)
Definition: unknown_fields_test.py:120
google::protobuf.internal.python_message.UnknownFields
UnknownFields
Definition: python_message.py:1432
google::protobuf.internal.unknown_fields_test.UnknownEnumValuesTest.testUnknownPackedEnumValue
def testUnknownPackedEnumValue(self)
Definition: unknown_fields_test.py:412
google::protobuf.internal.unknown_fields_test.UnknownFieldsTest.descriptor
descriptor
Definition: unknown_fields_test.py:60
google::protobuf.internal.unknown_fields_test.UnknownFieldsTest.testSerialize
def testSerialize(self)
Definition: unknown_fields_test.py:67
google::protobuf.internal.unknown_fields_test.UnknownFieldsAccessorsTest.testUnknownField
def testUnknownField(self)
Definition: unknown_fields_test.py:332
google::protobuf.internal
Definition: python/google/protobuf/internal/__init__.py:1
google::protobuf.internal.unknown_fields_test.UnknownFieldsAccessorsTest.empty_message
empty_message
Definition: unknown_fields_test.py:161
google::protobuf.internal.unknown_fields_test.UnknownFieldsTest
Definition: unknown_fields_test.py:57
google::protobuf.internal.unknown_fields_test.UnknownFieldsAccessorsTest.testMergeFrom
def testMergeFrom(self)
Definition: unknown_fields_test.py:260
update_failure_list.str
str
Definition: update_failure_list.py:41
google::protobuf.internal.unknown_fields_test.UnknownFieldsAccessorsTest.testCopyFrom
def testCopyFrom(self)
Definition: unknown_fields_test.py:255
google::protobuf.internal.unknown_fields_test.UnknownEnumValuesTest
Definition: unknown_fields_test.py:351
google::protobuf.internal.unknown_fields_test.UnknownEnumValuesTest.CheckUnknownField
def CheckUnknownField(self, name, expected_value)
Definition: unknown_fields_test.py:378
google::protobuf.internal.unknown_fields_test.UnknownEnumValuesTest.testUnknownParseMismatchEnumValue
def testUnknownParseMismatchEnumValue(self)
Definition: unknown_fields_test.py:388
google::protobuf.internal.unknown_fields_test.UnknownFieldsTest.setUp
def setUp(self)
Definition: unknown_fields_test.py:59
google::protobuf.internal.unknown_fields_test.UnknownFieldsAccessorsTest.all_fields
all_fields
Definition: unknown_fields_test.py:158
google::protobuf.internal.unknown_fields_test.UnknownFieldsAccessorsTest.testCheckUnknownFieldValue
def testCheckUnknownFieldValue(self)
Definition: unknown_fields_test.py:202
google::protobuf.internal.unknown_fields_test.UnknownFieldsAccessorsTest.CheckUnknownField
def CheckUnknownField(self, name, unknown_fields, expected_value)
Definition: unknown_fields_test.py:183
google::protobuf.internal.unknown_fields_test.UnknownFieldsAccessorsTest.InternalCheckUnknownField
def InternalCheckUnknownField(self, name, expected_value)
Definition: unknown_fields_test.py:170
google::protobuf.internal.unknown_fields_test.UnknownEnumValuesTest.setUp
def setUp(self)
Definition: unknown_fields_test.py:353
google::protobuf.internal.python_message.ListFields
ListFields
Definition: python_message.py:819
google::protobuf.internal.python_message.ByteSize
ByteSize
Definition: python_message.py:1067
google::protobuf.internal.unknown_fields_test.UnknownEnumValuesTest.testRoundTrip
def testRoundTrip(self)
Definition: unknown_fields_test.py:423
google::protobuf.internal.unknown_fields_test.UnknownFieldsTest.all_fields
all_fields
Definition: unknown_fields_test.py:61
google::protobuf.internal.unknown_fields_test.UnknownFieldsTest.testSerializeProto3
def testSerializeProto3(self)
Definition: unknown_fields_test.py:74
google::protobuf.internal.unknown_fields_test.UnknownEnumValuesTest.testUnknownRepeatedEnumValue
def testUnknownRepeatedEnumValue(self)
Definition: unknown_fields_test.py:409
google::protobuf.internal.python_message.ClearField
ClearField
Definition: python_message.py:902
decoder
static uint8_t decoder[96]
Definition: zmq_utils.cpp:85
google::protobuf.internal.unknown_fields_test.UnknownFieldsAccessorsTest
Definition: unknown_fields_test.py:154
len
int len
Definition: php/ext/google/protobuf/map.c:206
google::protobuf.internal.python_message.Clear
Clear
Definition: python_message.py:1431
google::protobuf.internal.unknown_fields_test.UnknownFieldsTest.testByteSize
def testByteSize(self)
Definition: unknown_fields_test.py:80
google::protobuf.internal.unknown_fields_test.UnknownEnumValuesTest.descriptor
descriptor
Definition: unknown_fields_test.py:354
google::protobuf::python::cmessage::ParseFromString
static PyObject * ParseFromString(CMessage *self, PyObject *arg)
Definition: python/google/protobuf/pyext/message.cc:1964
google::protobuf.internal.unknown_fields_test.UnknownFieldsAccessorsTest.testUnknownExtensions
def testUnknownExtensions(self)
Definition: unknown_fields_test.py:344
google::protobuf.internal.unknown_fields_test.UnknownEnumValuesTest.message
message
Definition: unknown_fields_test.py:356
google::protobuf.internal.unknown_fields_test.UnknownFieldsTest.empty_message
empty_message
Definition: unknown_fields_test.py:64
google::protobuf.internal.python_message.SerializeToString
SerializeToString
Definition: python_message.py:1081
google::protobuf.internal.unknown_fields_test.UnknownFieldsTest.testEquals
def testEquals(self)
Definition: unknown_fields_test.py:111
google::protobuf.internal.unknown_fields_test.UnknownEnumValuesTest.testUnknownEnumValue
def testUnknownEnumValue(self)
Definition: unknown_fields_test.py:401
google::protobuf.internal.python_message.HasField
HasField
Definition: python_message.py:864
google::protobuf.internal.unknown_fields_test.UnknownEnumValuesTest.message_data
message_data
Definition: unknown_fields_test.py:368
google::protobuf.internal.unknown_fields_test.UnknownFieldsTest.all_fields_data
all_fields_data
Definition: unknown_fields_test.py:63
google::protobuf.internal.unknown_fields_test.UnknownEnumValuesTest.missing_message
missing_message
Definition: unknown_fields_test.py:369
google::protobuf.internal.unknown_fields_test.UnknownFieldsAccessorsTest.descriptor
descriptor
Definition: unknown_fields_test.py:157
google::protobuf.internal.unknown_fields_test.UnknownFieldsAccessorsTest.testSubUnknownFields
def testSubUnknownFields(self)
Definition: unknown_fields_test.py:300


libaditof
Author(s):
autogenerated on Wed May 21 2025 02:07:00