message_test.py 文件源码

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

项目:go2mapillary 作者: enricofer 项目源码 文件源码
def testBadUtf8String(self, message_module):
    if api_implementation.Type() != 'python':
      self.skipTest("Skipping testBadUtf8String, currently only the python "
                    "api implementation raises UnicodeDecodeError when a "
                    "string field contains bad utf-8.")
    bad_utf8_data = test_util.GoldenFileData('bad_utf8_string')
    with self.assertRaises(UnicodeDecodeError) as context:
      message_module.TestAllTypes.FromString(bad_utf8_data)
    self.assertIn('TestAllTypes.optional_string', str(context.exception))
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号