Python google.protobuf.text_format._Printer() Examples
The following are 12 code examples for showing how to use google.protobuf.text_format._Printer(). These examples are extracted from open source projects. 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 check out the related API usage on the sidebar.
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
Project: lambda-packs Author: ryfeus File: text_format_test.py License: MIT License | 5 votes |
def testPrintField(self, message_module): message = message_module.TestAllTypes() field = message.DESCRIPTOR.fields_by_name['optional_float'] value = message.optional_float out = text_format.TextWriter(False) text_format.PrintField(field, value, out) self.assertEqual('optional_float: 0.0\n', out.getvalue()) out.close() # Test Printer out = text_format.TextWriter(False) printer = text_format._Printer(out) printer.PrintField(field, value) self.assertEqual('optional_float: 0.0\n', out.getvalue()) out.close()
Example 2
Project: lambda-packs Author: ryfeus File: text_format_test.py License: MIT License | 5 votes |
def testPrintFieldValue(self, message_module): message = message_module.TestAllTypes() field = message.DESCRIPTOR.fields_by_name['optional_float'] value = message.optional_float out = text_format.TextWriter(False) text_format.PrintFieldValue(field, value, out) self.assertEqual('0.0', out.getvalue()) out.close() # Test Printer out = text_format.TextWriter(False) printer = text_format._Printer(out) printer.PrintFieldValue(field, value) self.assertEqual('0.0', out.getvalue()) out.close()
Example 3
Project: auto-alt-text-lambda-api Author: abhisuri97 File: text_format_test.py License: MIT License | 5 votes |
def testPrintField(self, message_module): message = message_module.TestAllTypes() field = message.DESCRIPTOR.fields_by_name['optional_float'] value = message.optional_float out = text_format.TextWriter(False) text_format.PrintField(field, value, out) self.assertEqual('optional_float: 0.0\n', out.getvalue()) out.close() # Test Printer out = text_format.TextWriter(False) printer = text_format._Printer(out) printer.PrintField(field, value) self.assertEqual('optional_float: 0.0\n', out.getvalue()) out.close()
Example 4
Project: auto-alt-text-lambda-api Author: abhisuri97 File: text_format_test.py License: MIT License | 5 votes |
def testPrintFieldValue(self, message_module): message = message_module.TestAllTypes() field = message.DESCRIPTOR.fields_by_name['optional_float'] value = message.optional_float out = text_format.TextWriter(False) text_format.PrintFieldValue(field, value, out) self.assertEqual('0.0', out.getvalue()) out.close() # Test Printer out = text_format.TextWriter(False) printer = text_format._Printer(out) printer.PrintFieldValue(field, value) self.assertEqual('0.0', out.getvalue()) out.close()
Example 5
Project: coremltools Author: apple File: text_format_test.py License: BSD 3-Clause "New" or "Revised" License | 5 votes |
def testPrintField(self, message_module): message = message_module.TestAllTypes() field = message.DESCRIPTOR.fields_by_name['optional_float'] value = message.optional_float out = text_format.TextWriter(False) text_format.PrintField(field, value, out) self.assertEqual('optional_float: 0.0\n', out.getvalue()) out.close() # Test Printer out = text_format.TextWriter(False) printer = text_format._Printer(out) printer.PrintField(field, value) self.assertEqual('optional_float: 0.0\n', out.getvalue()) out.close()
Example 6
Project: coremltools Author: apple File: text_format_test.py License: BSD 3-Clause "New" or "Revised" License | 5 votes |
def testPrintFieldValue(self, message_module): message = message_module.TestAllTypes() field = message.DESCRIPTOR.fields_by_name['optional_float'] value = message.optional_float out = text_format.TextWriter(False) text_format.PrintFieldValue(field, value, out) self.assertEqual('0.0', out.getvalue()) out.close() # Test Printer out = text_format.TextWriter(False) printer = text_format._Printer(out) printer.PrintFieldValue(field, value) self.assertEqual('0.0', out.getvalue()) out.close()
Example 7
Project: go2mapillary Author: enricofer File: text_format_test.py License: GNU General Public License v3.0 | 5 votes |
def testPrintField(self, message_module): message = message_module.TestAllTypes() field = message.DESCRIPTOR.fields_by_name['optional_float'] value = message.optional_float out = text_format.TextWriter(False) text_format.PrintField(field, value, out) self.assertEqual('optional_float: 0.0\n', out.getvalue()) out.close() # Test Printer out = text_format.TextWriter(False) printer = text_format._Printer(out) printer.PrintField(field, value) self.assertEqual('optional_float: 0.0\n', out.getvalue()) out.close()
Example 8
Project: go2mapillary Author: enricofer File: text_format_test.py License: GNU General Public License v3.0 | 5 votes |
def testPrintFieldValue(self, message_module): message = message_module.TestAllTypes() field = message.DESCRIPTOR.fields_by_name['optional_float'] value = message.optional_float out = text_format.TextWriter(False) text_format.PrintFieldValue(field, value, out) self.assertEqual('0.0', out.getvalue()) out.close() # Test Printer out = text_format.TextWriter(False) printer = text_format._Printer(out) printer.PrintFieldValue(field, value) self.assertEqual('0.0', out.getvalue()) out.close()
Example 9
Project: Serverless-Deep-Learning-with-TensorFlow-and-AWS-Lambda Author: PacktPublishing File: text_format_test.py License: MIT License | 5 votes |
def testPrintField(self, message_module): message = message_module.TestAllTypes() field = message.DESCRIPTOR.fields_by_name['optional_float'] value = message.optional_float out = text_format.TextWriter(False) text_format.PrintField(field, value, out) self.assertEqual('optional_float: 0.0\n', out.getvalue()) out.close() # Test Printer out = text_format.TextWriter(False) printer = text_format._Printer(out) printer.PrintField(field, value) self.assertEqual('optional_float: 0.0\n', out.getvalue()) out.close()
Example 10
Project: Serverless-Deep-Learning-with-TensorFlow-and-AWS-Lambda Author: PacktPublishing File: text_format_test.py License: MIT License | 5 votes |
def testPrintFieldValue(self, message_module): message = message_module.TestAllTypes() field = message.DESCRIPTOR.fields_by_name['optional_float'] value = message.optional_float out = text_format.TextWriter(False) text_format.PrintFieldValue(field, value, out) self.assertEqual('0.0', out.getvalue()) out.close() # Test Printer out = text_format.TextWriter(False) printer = text_format._Printer(out) printer.PrintFieldValue(field, value) self.assertEqual('0.0', out.getvalue()) out.close()
Example 11
Project: keras-lambda Author: sunilmallya File: text_format_test.py License: MIT License | 5 votes |
def testPrintField(self, message_module): message = message_module.TestAllTypes() field = message.DESCRIPTOR.fields_by_name['optional_float'] value = message.optional_float out = text_format.TextWriter(False) text_format.PrintField(field, value, out) self.assertEqual('optional_float: 0.0\n', out.getvalue()) out.close() # Test Printer out = text_format.TextWriter(False) printer = text_format._Printer(out) printer.PrintField(field, value) self.assertEqual('optional_float: 0.0\n', out.getvalue()) out.close()
Example 12
Project: keras-lambda Author: sunilmallya File: text_format_test.py License: MIT License | 5 votes |
def testPrintFieldValue(self, message_module): message = message_module.TestAllTypes() field = message.DESCRIPTOR.fields_by_name['optional_float'] value = message.optional_float out = text_format.TextWriter(False) text_format.PrintFieldValue(field, value, out) self.assertEqual('0.0', out.getvalue()) out.close() # Test Printer out = text_format.TextWriter(False) printer = text_format._Printer(out) printer.PrintFieldValue(field, value) self.assertEqual('0.0', out.getvalue()) out.close()