test_utils_metrics.py 文件源码

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

项目:gax-python 作者: googleapis 项目源码 文件源码
def test_with_ordered_argument(self):
        headers = collections.OrderedDict()
        headers['gl-python'] = platform.python_version()
        headers['gapic'] = '1.0.0'
        headers['gax'] = gax.__version__
        headers['grpc'] = GRPC_VERSION
        string = metrics.stringify(headers)

        # Check for the exact string, order and all.
        expected = 'gl-python/{python} gapic/{gapic} gax/{gax} grpc/{grpc}'
        self.assertEqual(string, expected.format(
            gapic='1.0.0',
            gax=gax.__version__,
            grpc=GRPC_VERSION,
            python=platform.python_version(),
        ))
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号