Files
5902015fa8495ec0ef3c1ab92ae9a34c5bda4334
swift /tox.ini

83 lines
2.4 KiB
INI
Raw Normal View History

skipsdist = True
[testenv]
NOSE_COVER_BRANCHES=1
-r{toxinidir}/test-requirements.txt
find . -type d -name "__pycache__" -delete
nosetests {posargs:test/unit}
whitelist_externals = find
setenv = VIRTUAL_ENV={envdir}
NOSE_WITH_COVERAGE=1
NOSE_COVER_BRANCHES=1
NOSE_COVER_HTML=1
NOSE_COVER_HTML_DIR={toxinidir}/cover
commands =
nosetests test/unit/common/test_exceptions.py
flake8 {posargs:swift test doc setup.py}
flake8 --filename=swift* bin
basepython = python3
install_command = echo {packages}
commands =
# Gross hack. There's no other way to get it to /not/ install swift itself
# (which triggers installing eventlet) but also get flake8 installed.
pip install flake8
flake8 swift test doc setup.py
commands = ./.functests {posargs}
setenv = SWIFT_TEST_IN_PROCESS=1
SWIFT_TEST_IN_PROCESS_OBJECT_POST_AS_COPY=False
commands = {posargs}
commands = python setup.py build_sphinx
deps = -r{toxinidir}/test-requirements.txt
commands = bandit -c bandit.yaml -r swift bin -n 5 -p gate
# F812: list comprehension redefines ...
# H101: Use TODO(NAME)
# H202: assertRaises Exception too broad
# H233: Python 3.x incompatible use of print operator
# 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