0
点赞
收藏
分享

微信扫一扫

Pipenv环境配置+Pytest运行

我是芄兰 2023-12-11 阅读 21

环境配置

使用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文件
  • 运行

举报

相关推荐

0 条评论