コードをテストするために優れた 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 を除くすべてのバージョンですべてのテストが実行されます。トックスショー:
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