monasca-ui/tox.ini
Charles Short 4cfdc71d70 Make monasca-ui python3 compatible
In order to make monasca-ui python3 compatible this
patch set:
- Add six to requirements.txt
- Add py35 to tox.ini
- Replace dict.iteritems() with six.iteritems(dict)
- Replace prit msg with print(msg)
- Replace unicode with six.text_type(msg)
- Replaces urlparse with six.moves.urllib
- Python 3 getting the keys() of a dict returns
  a dict_keys object instead of a list
- python 2.x calling keys makes a copy of the key
  that you can iterate over while modifying the dict.
  This doesn't work in python 3.x because keys
  returns an iterator instead of a list.
  Another way is to use list to force a copy of the keys
  to be made.

Story: 2000975
Task: 4129

Signed-off-by: Charles Short <zulcss@gmail.com>

Change-Id: Ibc644a734edceea0b36f2df2c73300d1e4db925f
2018-03-29 15:53:22 -04:00

52 lines
1.5 KiB
INI

[tox]
envlist = py27,pep8,py35
minversion = 2.6
skipsdist = True
[testenv]
usedevelop = True
passenv = http_proxy
HTTP_PROXY
https_proxy
HTTPS_PROXY
no_proxy
NO_PROXY
deps = -c{env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt}
-r{toxinidir}/requirements.txt
-r{toxinidir}/test-requirements.txt
install_command = pip install {opts} {packages}
whitelist_externals =
/bin/bash
find
commands =
find . -type f -name "*.pyc" -delete
/bin/bash run_tests.sh -N {posargs}
[testenv:py27]
setenv =
DJANGO_SETTINGS_MODULE=monitoring.test.settings
[testenv:pep8]
commands = /bin/bash run_tests.sh -N --pep8
[testenv:venv]
commands = {posargs}
[testenv:cover]
commands = /bin/bash run_tests.sh -N --coverage {posargs}
[flake8]
builtins = _
exclude = .venv,.git,.tox,dist,*lib/python*,*egg,build,panel_template,dash_template,local_settings.py,*/local/*,*/test/test_plugins/*
# E127 continuation line over-indented for visual indent
# E128 continuation line under-indented for visual indent
# E501 line too long
# H102 Apache 2.0 license header not found
# H238 old style class declaration, use new style
# H301 one import per line
# H306 imports not in alphabetical order
# H405 multi line docstring summary not separated with an empty line
# H904 Wrap long lines in parentheses instead of a backslash
ignore = E127,E128,E501,H102,H238,H301,H306,H405,H904