[tox] envlist = py27,pep8 minversion = 1.6 skipsdist = True [testenv] usedevelop = True #install_command = pip install {opts} {packages} install_command = pip install --allow-external netifaces --allow-insecure netifaces -U {opts} {packages} deps = https://launchpad.net/swift/liberty/2.4.0/+download/swift-2.4.0.tar.gz -r{toxinidir}/test-requirements.txt commands = nosetests {posargs:tests} setenv = VIRTUAL_ENV={envdir} NOSE_WITH_OPENSTACK=1 NOSE_OPENSTACK_COLOR=1 NOSE_OPENSTACK_RED=0.05 NOSE_OPENSTACK_YELLOW=0.025 NOSE_OPENSTACK_SHOW_ELAPSED=1 NOSE_OPENSTACK_STDOUT=1 NOSE_WITH_COVERAGE=1 NOSE_COVER_BRANCHES=1 [testenv:pep8] commands = flake8 {posargs:swift_ceph_backend tests setup.py} [testenv:venv] commands = {posargs} [testenv:cover] setenv = VIRTUAL_ENV={envdir} NOSE_WITH_COVERAGE=1 NOSE_COVER_BRANCHES=1 NOSE_COVER_HTML=1 NOSE_COVER_HTML_DIR={toxinidir}/cover [tox:jenkins] downloadcache = ~/cache/pip [flake8] # follow the same style guidelines with swift # it's not a bug that we aren't using all of hacking, ignore: # F812: list comprehension redefines ... # H101: Use TODO(NAME) # H202: assertRaises Exception too broad # H233: Python 3.x incompatible use of print operator # H234: assertEquals is deprecated, use assertEqual # H301: one import per line # H306: imports not in alphabetical order (time, os) # H401: docstring should not start with a space # H403: multi line docstrings should end on a new line # H404: multi line docstring should start without a leading new line # H405: multi line docstring summary not separated with an empty line # H501: Do not use self.__dict__ for string formatting # H703: Multiple positional placeholders ignore = F812,H101,H202,H233,H234,H301,H306,H401,H403,H404,H405,H501,H703 exclude = .venv,.tox,dist,doc,*egg show-source = True