StarlingX Test tools
選択できるのは25トピックまでです。 トピックは、先頭が英数字で、英数字とダッシュ('-')を使用した35文字以内のものにしてください。

104 行
3.4KB

  1. [tox]
  2. minversion = 2.3
  3. skipsdist = True
  4. [testenv]
  5. install_command = pip install -c{env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt} {opts} {packages}
  6. setenv = VIRTUAL_ENV={envdir}
  7. OS_STDOUT_CAPTURE=1
  8. OS_STDERR_CAPTURE=1
  9. OS_TEST_TIMEOUT=60
  10. PYTHONDONTWRITEBYTECODE=True
  11. deps = -r{toxinidir}/test-requirements.txt
  12. [testenv:docs]
  13. basepython = python3
  14. deps = -r{toxinidir}/doc/requirements.txt
  15. commands =
  16. rm -rf doc/build
  17. sphinx-build -a -E -W -d doc/build/doctrees -b html doc/source doc/build/html
  18. whitelist_externals = rm
  19. [testenv:linters]
  20. basepython = python3
  21. whitelist_externals = bash
  22. commands =
  23. bash -c "find {toxinidir} \
  24. \( -name .tox -prune \) \
  25. -o -type f -name '*.yaml' \
  26. -print0 | xargs -0 yamllint"
  27. doc8 doc/source
  28. [testenv:pylint]
  29. basepython = python3
  30. recreate = True
  31. commands = pylint --rcfile=pylint.rc automated-pytest-suite automated-robot-suite
  32. [testenv:pep8]
  33. basepython = python3
  34. commands = flake8 {posargs}
  35. [flake8]
  36. # Following checks should be enabled in the future.
  37. #
  38. # H101 Use TODO(NAME)
  39. # H104 File contains nothing but comments
  40. # H201 no 'except:'
  41. # H238 old style class declaration
  42. # H301 one import per line
  43. # H306 imports not in alphabetical order
  44. # H401 docstring should not start with a space
  45. # H403 multi line docstrings should end on a new line
  46. # H404 multi line docstring should start without a leading new line
  47. # H405 multi line docstring summary not separated with an empty line
  48. # H903 Windows style line endings not allowed in code
  49. #
  50. # W291 trailing whitespace
  51. # W292 no newline at end of file
  52. # W391 blank line at end of file
  53. # W503 line break before binary operator
  54. #
  55. # E121 continuation line under-indented for hanging indent
  56. # E123 closing bracket does not match indentation of opening bracket's line
  57. # E126 continuation line over-indented for hanging indent
  58. # E127 continuation line over-indented for visual indent
  59. # E128 continuation line under-indented for visual indent
  60. # E226 missing whitespace around arithmetic operator
  61. # E241 multiple spaces after ','
  62. # E261 at least two spaces before inline comment
  63. # E302 expected 2 blank lines, found 1
  64. # E303 too many blank lines
  65. # E713 test for membership should be 'not in'
  66. # E731 do not assign a lambda expression, use a def
  67. #
  68. # F401 'X' imported but unused
  69. # F403 ‘from module import *’ used; unable to detect undefined names
  70. # F811 redefinition of unused 'X' from line 'Y'
  71. # F841 local variable 'X' is assigned to but never used
  72. #
  73. ignore = H101,H104,H201,H238,H301,H306,H401,H403,H404,H405,H903,
  74. W291,W292,W391,W503,
  75. E121,E123,E126,E127,E128,E226,E261,E241,E302,E303,E713,E731,
  76. F401,F403,F811,F841
  77. show-source = True
  78. exclude=.venv,.git,.tox,dist,*lib/python*,*egg,build,doc/source/conf.py,releasenotes
  79. # Default max-line-length is 80. This should be reduced as the files are cleaned up.
  80. max-line-length = 109
  81. [testenv:releasenotes]
  82. basepython = python3
  83. deps = -r{toxinidir}/doc/requirements.txt
  84. commands =
  85. rm -rf releasenotes/build
  86. sphinx-build -a -E -W -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html
  87. whitelist_externals =
  88. rm
  89. reno
  90. [testenv:newnote]
  91. basepython = python3
  92. envdir = {toxworkdir}/releasenotes
  93. deps = -r{toxinidir}/doc/requirements.txt
  94. commands = reno new {posargs}