text_format_test.py 文件源码

python
阅读 16 收藏 0 点赞 0 评论 0

项目:protoc-gen-lua-bin 作者: u0u0 项目源码 文件源码
def testParseRepeatedExtensionScalars(self):
    message = unittest_pb2.TestAllExtensions()
    text = ('[protobuf_unittest.optional_int32_extension]: 42 '
            '[protobuf_unittest.optional_int32_extension]: 67')
    self.assertRaisesWithLiteralMatch(
        text_format.ParseError,
        ('1:96 : Message type "protobuf_unittest.TestAllExtensions" '
         'should not have multiple '
         '"protobuf_unittest.optional_int32_extension" extensions.'),
        text_format.Parse, text, message)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号