起初看起来测试依赖项正在安装(Processing coverage-4.4.2-py3.5.egg
),然后突然间它们没有安装(The ' coverage' 模块未安装
)。出了什么问题?
(DictORM) 14:15 john@john:~/git/DictORM(master)$ python setup.py test --run-coverage
running green
Searching for coveralls
Best match: coveralls 1.2.0
Processing coveralls-1.2.0-py3.5.egg
Using /home/john/repos/git/DictORM/.eggs/coveralls-1.2.0-py3.5.egg
Searching for coverage
Best match: coverage 4.4.2
Processing coverage-4.4.2-py3.5.egg
Using /home/john/repos/git/DictORM/.eggs/coverage-4.4.2-py3.5.egg
Searching for docopt>=0.6.1
Best match: docopt 0.6.2
Processing docopt-0.6.2-py3.5.egg
Using /home/john/repos/git/DictORM/.eggs/docopt-0.6.2-py3.5.egg
Fatal: The 'coverage' module is not installed. Have you run 'pip install coverage' ???
最佳答案
确实如此。此环境中的导入错误是由 green 实际上未将覆盖范围指定为额外依赖项引起的。我们决定在 2.12.0 中将其作为必需的依赖项来解决此问题。 The bug fix was discussed here .
关于python - `python setup.py test` 是否安装依赖?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/47567902/