技术栈

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
上一篇:数学建模---论文写作
下一篇:景联文科技提供语音采集服务:开启智能交互新纪元
相关推荐
旦莫
3 天前
Pytest教程: Pytest ini配置文件深度剖析
python·单元测试·自动化·pytest
Mr_Xuhhh
7 天前
pytest -- 测试报告allure
pytest
我的xiaodoujiao
8 天前
使用 Python 语言 从 0 到 1 搭建完整 Web UI自动化测试学习系列 28--开源电商商城系统项目实战--封装注册页面
python·学习·测试工具·pytest
Mr_Xuhhh
8 天前
pytest -- fixture
开发语言·python·pytest
Mr_Xuhhh
9 天前
pytest -- 指定⽤例执⾏顺序
开发语言·python·pytest
Mr_Xuhhh
9 天前
pytest -- ⽇志与测试报告
pytest
西游音月
11 天前
(5)pytest+Selenium自动化测试-元素定位之XPath定位
selenium·测试工具·pytest
西游音月
12 天前
(4)pytest+Selenium自动化测试-元素定位之CSS Selector定位
css·selenium·pytest
淼_@淼
14 天前
pytest-数据驱动
pytest
热门推荐
01GitHub 镜像站点02【超详细教程】手把手教你从微软官网免费下载Windows 10官方原版ISO镜像(2025最新版)03安娜的档案(Anna’s Archive) 镜像网站/国内最新可访问入口(持续更新)04UV安装并设置国内源05React CVE-2025-55182漏洞排查与修复指南06智能库存管理的需求预测模型:从业务痛点到落地代码的完整实践07BongoCat - 跨平台键盘猫动画工具08Linux下V2Ray安装配置指南09本地部署阿里最新开源的Z-Image10在VSCode配置Java开发环境的保姆级教程(适配各类AI编程IDE)