错误
pytest=7.2.1,pytest-html=3.1.1,单元测试时报错
# tox.ini执行的命令 pytest --junit-xml=./pytest.report.xml --cov=./src --cov-report=xml
# 报错信息 <module> from py.xml import html ModuleNotFoundError: No module named 'py.xml'; 'py' is not a package
pytest-html的官方issue
Add py as dependency
Updated Jun 5, 2023
解决方案
手动添加依赖py = "1.11.0”