2017-12-04 22 views
0

私は基本的に私のプロジェクトにtoxを使用しています。ここで警告を表示している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 

私はTOXを実行するたびに、すべてのものは基本的にリンティングされ、カバレッジを実行なっています。

しかし、Toxはすべての警告を表示しています。

WARNING:test command found but not installed in testenv 
Maybe you forgot to specify a dependency? See also the whitelist_externals envconfig setting. 

すべてが成功しますが、まだ誰もが私が間違っているの何に私を伝えることができ、警告やエラー

が表示されています。あなたは commandsで使用

私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 
+0

あなたはrequirements.txt 'の内容を示すことができました'? – alecxe

+0

@alecxe私の質問を編集しました:) – primer

+0

あなたの要件にpylintとカバレッジを設定する場合、同じエラーが発生しますか? – alecxe

答えて

1

プログラムのいずれかTOX」仮想環境にインストールまたはホワイトリストに登録する必要があります。

[tox] 
envlist = 
    py27, 
    lint, 
    coverage 

skipsdist = True 

[testenv:py27] 
deps = -rrequirements.txt 
whitelist_externals = python 
commands = python -m unittest discover -s ./tests 

[testenv:coverage] 
whitelist_externals = coverage 
commands = 
    coverage run --source=tests -m unittest discover -s tests/ 
    coverage html 
    coverage report 


[testenv:lint] 
whitelist_externals = pylint 
commands = pylint ./foo 
+0

@primer助けてくれますか? – phd

関連する問題