pytest导入

2024-04-26 09:25:08 发布

您现在位置:Python中文网/ 问答频道 /正文

我的文件夹布局大致是这样的

mesa/
    └── mesa
        └── __init__.py
        └── some module files
    └── tests

当我在最上面的mesa文件夹中运行pytest --cov=mesa tests/时,我收到了以下错误消息(只有一个片段)

^{pr2}$

为什么即使__init__.py文件存在,也会发生这种情况?在


Tags: 文件py文件夹消息initpytest错误tests