Pipenv环境配置+Pytest运行

环境配置

使用Pipenv进行虚拟环境管理,Pipfile为依赖模块管理文件。

  1. 安装pipenv:brew install pipenv
  2. 根项目根目录下执行命令创建虚拟环境: pipenv install
  3. 在Pycharm中指定项目运行的虚拟环境 :File->Settings->Project:->Project Interpreter

执行用例

  • 配置PyCharm的default test runner为pytest
  • 打开PyCharm的run/debug configurations窗口,指定运行文件
  • pytest.ini文件中指定配置的config文件

addopts = -rsxX --color=yes --env=test --config=folder/xx_config.yaml --alluredir allure-results --json-report

  • 运行
相关推荐
九皇叔叔28 分钟前
Linux Shell 中的 $():命令替换的核心用法
linux·运维·chrome
半桔1 小时前
【网络编程】详解 IP 协议:报头字段、路由器功能、网段划分和分片传输
linux·网络·网络协议·tcp/ip
大聪明-PLUS1 小时前
TCP/IP 协议族—理论与实践(二)
linux·嵌入式·arm·smarc
liulilittle1 小时前
Linux内核网络优化:两个网络调优解决方案
linux·运维·服务器·网络·内核·信息与通信·通信
hweiyu001 小时前
Linux运维实战:系统及服务管理(视频教程)
linux·运维·服务器
风随心飞飞1 小时前
linux 环境下mysql 数据库自动备份和清库 通过crontab 创建定时任务实现mysql数据库备份
linux·数据库·mysql
止观止1 小时前
VS Code 二次开发:跨平台图标定制全攻略
linux·windows·vscode·macos
九皇叔叔2 小时前
Windows用Notepad++编辑Shell脚本:一招解决Linux执行报错问题
linux·windows·notepad++
柳鲲鹏3 小时前
交叉编译:strip: Unable to recognise the format of the input file xx.c.o
linux·运维·服务器
六六六六六66663 小时前
Ubuntu22.04安装Ibus的中文输入法
linux