【发布时间】:2012-01-15 16:41:23
【问题描述】:
我将测试拆分到多个 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
【问题讨论】:
-
这不是错误,这只是您有未使用的导入的信息。没有任何问题。
标签: python import lint pyflakes