aus Ich habe gelernt, wie man in tox für mein Python-Projekt testet.flake8/pylint schlägt in der Tox-Testumgebung fehl, löst InvocationError
Ich habe eine ziemlich Standard-tox Initialisierungsdatei (was soll), die wie folgt aussieht:
[tox]
envlist=py27,flake8
...
[testenv:flake8]
deps=flake8
commands=flake8 library # 'library' is temp. name of project
Alles sieht normal, alle Testarbeiten und sogar der flake8 Ausgang kommt durch (Ausgang unten) . Allerdings tox wirft eine InvocationError (es macht das gleiche für die Prüfung mit Pylint)
flake8 recreate: /Users/shostakovich/projects/project_templates/library/.tox/flake8
flake8 installdeps: flake8
flake8 inst: /Users/shostakovich/projects/project_templates/library/.tox/dist/library-0.1.0.zip
flake8 installed: flake8==2.4.1,library==0.1.0,mccabe==0.3,pep8==1.5.7,pyflakes==0.8.1,wheel==0.24.0
library/__main__.py:12:1: F401 'os' imported but unused
library/__main__.py:13:1: F401 're' imported but unused
...
ERROR: InvocationError: '/Users/shostakovich/projects/project_templates/library/.tox/flake8/bin/flake8 library'
Ich bin mit tox 2.0.2 auf MaxOSX 10.9.5. Das Problem verschwindet, wenn ich flame8 oder pylint direkt anrufe (die Version von flocke8 ist oben abgebildet).