I learned how to do core testing for my python project.
I have (what should be) a pretty standard token initialization file that looks like this:
[tox] envlist=py27,flake8 ... [testenv:flake8] deps=flake8 commands=flake8 library # 'library' is temp. name of project
Everything looks fine, all tests work, and even quitting flake8 passes (output below). However, the current raises an InvocationError (it does the same for testing with 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'
I am running current 2.0.2 on MaxOSX 10.9.5. The problem will disappear if I just call flake8 or pylint (the flake8 version is shown above).
python testing tox flake8
kazimir.r
source share