我将测试拆分到多个 Python 文件中:
tests
├── __init__.py
├── test_apples.py
└── test_bananas.py.py
我在 '__init__.py' 文件中导入测试:
from test_apples import ApplesTest
from test_bananas import BananasTest
但是在命令行上运行 Pyflakes:
pyflakes .
输出以下错误:
tests/__init__.py:1: [E] PYFLAKES:'ApplesTest' imported but unused
tests/__init__.py:2: [E] PYFLAKES:'BananasTest' imported but unused