Python google.protobuf.text_format.MergeLines() Examples
The following are 9
code examples of google.protobuf.text_format.MergeLines().
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example.
You may also want to check out all available functions/classes of the module
google.protobuf.text_format
, or try the search function
.
Example #1
Source File: text_format_test.py From lambda-packs with MIT License | 5 votes |
def testMergeLinesGolden(self): opened = self.ReadGolden('text_format_unittest_data_oneof_implemented.txt') parsed_message = unittest_pb2.TestAllTypes() r = text_format.MergeLines(opened, parsed_message) self.assertIs(r, parsed_message) message = unittest_pb2.TestAllTypes() test_util.SetAllFields(message) self.assertEqual(message, parsed_message)
Example #2
Source File: text_format_test.py From auto-alt-text-lambda-api with MIT License | 5 votes |
def testMergeLinesGolden(self): opened = self.ReadGolden('text_format_unittest_data_oneof_implemented.txt') parsed_message = unittest_pb2.TestAllTypes() r = text_format.MergeLines(opened, parsed_message) self.assertIs(r, parsed_message) message = unittest_pb2.TestAllTypes() test_util.SetAllFields(message) self.assertEqual(message, parsed_message)
Example #3
Source File: text_format_test.py From sklearn-theano with BSD 3-Clause "New" or "Revised" License | 5 votes |
def testMergeLinesGolden(self): opened = self.ReadGolden('text_format_unittest_data.txt') parsed_message = unittest_pb2.TestAllTypes() r = text_format.MergeLines(opened, parsed_message) self.assertIs(r, parsed_message) message = unittest_pb2.TestAllTypes() test_util.SetAllFields(message) self.assertEqual(message, parsed_message)
Example #4
Source File: text_format_test.py From botchallenge with MIT License | 5 votes |
def testMergeLinesGolden(self): opened = self.ReadGolden('text_format_unittest_data.txt') parsed_message = unittest_pb2.TestAllTypes() r = text_format.MergeLines(opened, parsed_message) self.assertIs(r, parsed_message) message = unittest_pb2.TestAllTypes() test_util.SetAllFields(message) self.assertEqual(message, parsed_message)
Example #5
Source File: text_format_test.py From coremltools with BSD 3-Clause "New" or "Revised" License | 5 votes |
def testMergeLinesGolden(self): opened = self.ReadGolden('text_format_unittest_data_oneof_implemented.txt') parsed_message = unittest_pb2.TestAllTypes() r = text_format.MergeLines(opened, parsed_message) self.assertIs(r, parsed_message) message = unittest_pb2.TestAllTypes() test_util.SetAllFields(message) self.assertEqual(message, parsed_message)
Example #6
Source File: text_format_test.py From go2mapillary with GNU General Public License v3.0 | 5 votes |
def testMergeLinesGolden(self): opened = self.ReadGolden('text_format_unittest_data_oneof_implemented.txt') parsed_message = unittest_pb2.TestAllTypes() r = text_format.MergeLines(opened, parsed_message) self.assertIs(r, parsed_message) message = unittest_pb2.TestAllTypes() test_util.SetAllFields(message) self.assertEqual(message, parsed_message)
Example #7
Source File: tensor_spec.py From agents with Apache License 2.0 | 5 votes |
def from_pbtxt_file(spec_path): """Loads a spec encoded as a struct_pb2.StructuredValue from a pbtxt file.""" spec_proto = struct_pb2.StructuredValue() with tf.io.gfile.GFile(spec_path, "rb") as f: text_format.MergeLines(f, spec_proto) return from_proto(spec_proto)
Example #8
Source File: text_format_test.py From Serverless-Deep-Learning-with-TensorFlow-and-AWS-Lambda with MIT License | 5 votes |
def testMergeLinesGolden(self): opened = self.ReadGolden('text_format_unittest_data_oneof_implemented.txt') parsed_message = unittest_pb2.TestAllTypes() r = text_format.MergeLines(opened, parsed_message) self.assertIs(r, parsed_message) message = unittest_pb2.TestAllTypes() test_util.SetAllFields(message) self.assertEqual(message, parsed_message)
Example #9
Source File: text_format_test.py From keras-lambda with MIT License | 5 votes |
def testMergeLinesGolden(self): opened = self.ReadGolden('text_format_unittest_data_oneof_implemented.txt') parsed_message = unittest_pb2.TestAllTypes() r = text_format.MergeLines(opened, parsed_message) self.assertIs(r, parsed_message) message = unittest_pb2.TestAllTypes() test_util.SetAllFields(message) self.assertEqual(message, parsed_message)