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
相关推荐
Tom Boom4 天前
Pytest断言全解析:掌握测试验证的核心艺术
自动化测试·python·测试开发·pytest
不要一直敲门5 天前
初学 pytest 记录
pytest
测试界清流6 天前
Selenium4+Pytest自动化测试框架
selenium·测试工具·pytest
努力搬砖的咸鱼8 天前
从零开始搭建 Pytest 测试框架(Python 3.8 + PyCharm 版)
python·pycharm·pytest
FINE!(正在努力!)10 天前
PyTest框架学习
学习·pytest
程序员杰哥10 天前
接口自动化测试之pytest 运行方式及前置后置封装
自动化测试·软件测试·python·测试工具·职场和发展·测试用例·pytest
测试老哥11 天前
Pytest+Selenium UI自动化测试实战实例
自动化测试·软件测试·python·selenium·测试工具·ui·pytest
水银嘻嘻11 天前
07 APP 自动化- appium+pytest+allure框架封装
python·appium·自动化·pytest
天才测试猿11 天前
接口自动化测试之pytest接口关联框架封装
自动化测试·软件测试·python·测试工具·职场和发展·测试用例·pytest
not coder12 天前
Pytest Fixture 详解
数据库·pytest