• 博客园logo
  • 会员
  • 周边
  • 新闻
  • 博问
  • 闪存
  • 众包
  • 赞助商
  • Chat2DB
    • 搜索
      所有博客
    • 搜索
      当前博客
  • 写随笔 我的博客 短消息 简洁模式
    用户头像
    我的博客 我的园子 账号设置 会员中心 简洁模式 ... 退出登录
    注册 登录

博客园    首页    新随笔    联系   管理    订阅  订阅
2021年8月6日
测试框架--pytest统计case运行结果
摘要: 统计case运行的结果需要使用pytest-json-report插件,需要安装 pip install pytest-json-report 1 import pytest 2 from pytest_jsonreport.plugin import JSONReport 3 4 5 6 clas 阅读全文
posted @ 2021-08-06 16:41 搁浅小夕 阅读(792) 评论(0) 推荐(0)
Python dict和str互转
摘要: 一、将str转化为dict1.1 使用Python 3的内置ast库的函数literal_eval。最好使用literal_eval而不是eva 1 import ast 2 str_of_dict = "{'name': 'xiaohong', 'age': '18'}" 3 new_dic = 阅读全文
posted @ 2021-08-06 15:23 搁浅小夕 阅读(4949) 评论(0) 推荐(0)
博客园  ©  2004-2026
浙公网安备 33010602011771号 浙ICP备2021040463号-3