pyinstaller pyqt5 pytest打包后报错no module unittest.mock

pyinstaller pyqt5 pytest打包后报错no module unittest.mock

在.spec文件下加上unittest.mock

打包时写成

shell 复制代码
pyinstaller --onefile --hidden-import=unittest.mock --add-data "src\tests;src\tests" src/main.py
相关推荐
凛铄linshuo5 天前
分析业务流程什么时候适合断言?
python·pytest
凛铄linshuo6 天前
自动化测试:pytest第一个实例学习
学习·pytest
Helix2508 天前
Python单元测试实战:pytest框架从入门到企业级测试体系搭建指南
python·单元测试·实战·mock·pytest·测试覆盖率·fixture
在世修行13 天前
干货:pytest
pytest·fixture·pytest assert
小小龙学IT14 天前
Python pytest 测试框架深度解析:从断言重写到插件生态的工程化测试体系
网络·python·pytest
落魄大学生之流水线上谋生计16 天前
pytest 入门与实践:从第一个测试到可维护的测试体系
pytest
念越18 天前
Allure 测试报告保姆级教程:从安装到 pytest 集成与报告生成
pytest·allure
念越18 天前
接口自动化测试从入门到实战:接口用例设计、Requests、Pytest、YAML、JSON Schema 与 Allure 报告
python·测试工具·自动化·json·pytest
霍格沃兹测试学院-小舟畅学22 天前
AI+Swagger:一键生成500条pytest接口用例
人工智能·pytest
把头塞进显示器1 个月前
电商平台-测试报告
python·selenium·pytest