技术栈

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

温温净2024-08-24 21:51

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
上一篇:数学建模---论文写作
下一篇:景联文科技提供语音采集服务:开启智能交互新纪元
相关推荐
lucia_zl
2 天前
pytest并发测试,资源问题导致用例失败解决办法
pytest
鱼鱼说测试
2 天前
Selenium4+Pytest自动化测试框架实战
pytest
XYiFfang
8 天前
【Pytest】解决Pytest中Teardown钩子的TypeError:实例方法与类方法的调用差异
python·pytest
Kingairy
10 天前
Pytest 插件:pytest_runtest_protocol
python·pytest
AIZHINAN
10 天前
Pytest 插件介绍和开发
测试工具·pytest·插件开发
灰阳阳
12 天前
替身演员的艺术:pytest-mock 从入门到飙戏
自动化测试·python·pytest·unit testing·pytest-mock
年年测试
15 天前
Playwright与PyTest结合指南
pytest
focksorCr
16 天前
pytest 并发执行用例(基于受限的测试资源)
python·pytest
律品
20 天前
pytest的前置与后置
开发语言·python·pytest
热门推荐
01conda中设置镜像地址(附所有可换的地址)02UV安装并设置国内源03A股预测还能更准?开源大模型Kronos带你跑通预测+回测全流程04UV 工具安装与国内镜像源配置指南05解决 WSL Ubuntu 中 /etc/resolv.conf 自动重置问题06突破百度网盘的下载限速,两种方法教会你【超详细】07KGG转MP3工具|非KGM文件|解密音频08GitHub 镜像站点09教你如何认证 Gemini 教育优惠的二次验证,薅个 1年的 Gemini Pro 会员1046个Nano-banana 精选提示词,持续更新中