我正在使用优秀的Tox工具来测试我的代码。这是我的tox.ini
:
[tox]
envlist = py26,py27,py31,py32,py33
[testenv]
deps = ParamUnittest
commands = python -m unittest discover tests
downloadcache = build
[testenv:py26]
deps = https://github.com/rik0/ParamUnittest/tarball/master
unittest2
importlib
commands = python -m unittest2.__main__ discover tests
[testenv:py31]
deps = https://github.com/rik0/ParamUnittest/tarball/master
unittest2py3k
commands = python -m unittest2 discover tests
运行时,除3.1之外的所有版本都执行所有测试。 Tox表示:
py31 sdist-reinst: /home/miki/exp/radon/.tox/dist/radon-0.1.zip
py31 runtests: commands[0]
----------------------------------------------------------------------
Ran 0 tests in 0.000s
OK
为什么不执行测试?系统布局如下:
tests/
test_internals.py
test_complexity.py
...
radon/
...
setup.py
tox.ini