Notification Engine for Monasca
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

tox.ini 2.3KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798
  1. [tox]
  2. envlist = py{27,35,py},pep8,cover
  3. minversion = 2.7
  4. skipsdist = True
  5. [testenv]
  6. setenv =
  7. VIRTUAL_ENV={envdir}
  8. OS_TEST_PATH=tests
  9. passenv =
  10. *_proxy
  11. *_PROXY
  12. usedevelop = True
  13. install_command = pip install {opts} {packages}
  14. whitelist_externals = bash
  15. find
  16. rm
  17. deps =
  18. -c{env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt}
  19. -r{toxinidir}/requirements.txt
  20. -r{toxinidir}/test-requirements.txt
  21. .[jira_plugin]
  22. commands =
  23. find . -type f -name "*.pyc" -delete
  24. rm -Rf .testrepository/times.dbm
  25. [testenv:py27]
  26. description = Runs unit test using Python2.7
  27. basepython = python2.7
  28. commands =
  29. {[testenv]commands}
  30. ostestr {posargs}
  31. [testenv:py35]
  32. description = Runs unit test using Python3.5
  33. basepython = python3.5
  34. commands =
  35. {[testenv]commands}
  36. ostestr {posargs}
  37. [testenv:pypy]
  38. description = Runs unit test using pypy
  39. basepython = pypy
  40. commands =
  41. {[testenv]commands}
  42. ostestr {posargs}
  43. [testenv:cover]
  44. commands =
  45. {[testenv]commands}
  46. coverage erase
  47. python setup.py test --coverage --testr-args='{posargs}' --coverage-package-name=monasca_notification
  48. coverage report
  49. [testenv:debug]
  50. commands =
  51. oslo_debug_helper -t ./monasca_notification/tests {posargs}
  52. [testenv:pep8]
  53. commands =
  54. {[testenv:flake8]commands}
  55. {[testenv:bandit]commands}
  56. [testenv:venv]
  57. commands = {posargs}
  58. [testenv:flake8]
  59. commands =
  60. flake8 monasca_notification
  61. flake8 tests
  62. [testenv:bandit]
  63. commands =
  64. bandit -r monasca_notification -n5 -x monasca_notification/tests
  65. [testenv:genconfig]
  66. description = Generates an example of monasca-notification configuration file
  67. commands = oslo-config-generator --config-file={toxinidir}/config-generator/notification.conf
  68. [flake8]
  69. max-line-length = 120
  70. # TODO: ignored checks should be enabled in the future
  71. # H201 no 'except:' at least use 'except Exception:'
  72. # H202: assertRaises Exception too broad
  73. # H405 multi line docstring summary not separated with an empty line
  74. ignore = F821,H201,H202,H405
  75. exclude=.venv,.git,.tox,dist,*egg,build
  76. [hacking]
  77. import_exceptions =
  78. six.moves
  79. [testenv:lower-constraints]
  80. basepython = python3
  81. deps =
  82. -c{toxinidir}/lower-constraints.txt
  83. -r{toxinidir}/test-requirements.txt
  84. -r{toxinidir}/requirements.txt