嘿家伙所以我基本上使用tox来完成我的项目.
这是我的tox.ini文件
[tox]
envlist =
py27,
lint,
coverage
skipsdist = True
[testenv:py27]
deps = -rrequirements.txt
commands = python -m unittest discover -s ./tests
[testenv:coverage]
commands =
coverage run --source=tests -m unittest discover -s tests/
coverage html
coverage report
[testenv:lint]
commands = pylint ./foo
Run Code Online (Sandbox Code Playgroud)
每当我运行tox时,一切都在执行,基本上是linting,coverage.
但Tox正在显示所有事情的警告.
WARNING:test command found but not installed in testenv
Maybe you forgot to specify a dependency? See also the whitelist_externals envconfig setting.
Run Code Online (Sandbox Code Playgroud)
一切都成功但它仍然显示警告和错误
任何人都可以告诉我我做错了什么.
我的requirements.txt文件
requests==2.18.4
JsonForm==0.0.2
jsonify==0.5
jsonschema==2.6.0
JsonSir==0.0.2
python-dateutil==1.5
DateTime==4.2
urllib3==1.22
contextlib2==0.5.5
mock==2.0.0
patch==1.16
Run Code Online (Sandbox Code Playgroud)