base.py 文件源码

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

项目:picasso 作者: openstack 项目源码 文件源码
def get_loop_and_logger(self, test_type):
        self.route_data = {
            "type": "async",
            "path": "/hello-sync-private",
            "image": "iron/hello",
            "is_public": "false"
        }
        try:
            testloop = asyncio.get_event_loop()
        except Exception:
            asyncio.set_event_loop_policy(uvloop.EventLoopPolicy())
            testloop = asyncio.get_event_loop()

        logger = log.UnifiedLogger(
            log_to_console=False,
            filename=("./picasso-{}-tests-run-{}.log"
                      .format(test_type, datetime.datetime.now())),
            level="DEBUG").setup_logger(__package__)
        return testloop, logger
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号