A python library of common ironic utilities.
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 1.8KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. [tox]
  2. minversion = 1.8
  3. skipsdist = True
  4. envlist = py3,py27,pep8
  5. [testenv]
  6. install_command = pip install {opts} {packages}
  7. usedevelop = True
  8. setenv = VIRTUAL_ENV={envdir}
  9. PYTHONDONTWRITEBYTECODE = 1
  10. LANGUAGE=en_US
  11. TESTS_DIR=./ironic_lib/tests/
  12. deps =
  13. -c{env:UPPER_CONSTRAINTS_FILE:https://opendev.org/openstack/requirements/raw/branch/master/upper-constraints.txt}
  14. -r{toxinidir}/test-requirements.txt
  15. -r{toxinidir}/requirements.txt
  16. commands = stestr run {posargs}
  17. [flake8]
  18. show-source = True
  19. ignore = E129
  20. exclude = .venv,.tox,dist,doc,*.egg,.update-venv
  21. import-order-style = pep8
  22. application-import-names = ironic_lib
  23. # [H106] Don't put vim configuration in source files.
  24. # [H203] Use assertIs(Not)None to check for None.
  25. # [H204] Use assert(Not)Equal to check for equality.
  26. # [H205] Use assert(Greater|Less)(Equal) for comparison.
  27. # [H210] Require 'autospec', 'spec', or 'spec_set' in mock.patch/mock.patch.object calls
  28. # [H904] Delay string interpolations at logging calls.
  29. enable-extensions=H106,H203,H204,H205,H210,H904
  30. [testenv:pep8]
  31. basepython = python3
  32. commands =
  33. flake8 {posargs}
  34. doc8 README.rst doc/source --ignore D001
  35. [testenv:cover]
  36. basepython = python3
  37. setenv = VIRTUALENV={envdir}
  38. LANGUAGE=en_US
  39. PYTHON=coverage run --source ironic_lib --omit='*tests*' --parallel-mode
  40. commands =
  41. coverage erase
  42. stestr run {posargs}
  43. coverage combine
  44. coverage report --omit='*tests*'
  45. coverage html -d ./cover --omit='*tests*'
  46. [testenv:venv]
  47. basepython = python3
  48. commands = {posargs}
  49. [testenv:docs]
  50. basepython = python3
  51. setenv = PYTHONHASHSEED=0
  52. sitepackages = False
  53. envdir = {toxworkdir}/venv
  54. commands =
  55. python setup.py build_sphinx
  56. [testenv:lower-constraints]
  57. basepython = python3
  58. deps =
  59. -c{toxinidir}/lower-constraints.txt
  60. -r{toxinidir}/test-requirements.txt
  61. -r{toxinidir}/requirements.txt