tox.ini 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. [tox]
  2. envlist = flake8,py{27,34,35,36,37},cov-report,cov-store
  3. [testenv]
  4. use_develop = true
  5. deps =
  6. -r{toxinidir}/requirements-test.txt
  7. # setup.py has unpinned dependencies by default
  8. !unpinned: -r{toxinidir}/requirements.txt
  9. setenv =
  10. COVERAGE_FILE = tests/.coverage.{envname}
  11. PYTHONDONTWRITEBYTECODE=1
  12. commands =
  13. coverage run -m pytest {toxinidir}/tests {toxinidir}/flaskbb {posargs}
  14. [testenv:flake8]
  15. skip_install = true
  16. deps = -r{toxinidir}/requirements-lint.txt
  17. basepython=python3.6
  18. commands =
  19. flake8 --version
  20. flake8 --config={toxinidir}/tox.ini {toxinidir}/flaskbb {toxinidir}/tests
  21. [testenv:cov-report]
  22. skip_install = true
  23. setenv =
  24. COVERAGE_FILE = tests/.coverage
  25. deps =
  26. -r{toxinidir}/requirements-cov.txt
  27. commands =
  28. coverage combine tests
  29. coverage report
  30. [testenv:cov-store]
  31. skip_install = true
  32. setenv =
  33. COVERAGE_FILE = tests/.coverage
  34. deps =
  35. -r{toxinidir}/requirements-cov.txt
  36. commands =
  37. coverage html
  38. [testenv:black]
  39. skip_install = true
  40. deps = black
  41. basepython=python3.6
  42. commands = black --check tests/ flaskbb/
  43. [flake8]
  44. ignore = E203, E712, E711, W503
  45. select = C,E,F,W,B,B9
  46. max-complexity = 10
  47. max-line-length = 88
  48. exclude =
  49. # allowed to break the rules
  50. flaskbb/configs/default.py,
  51. flaskbb/_compat.py,
  52. # migrations are autogenerated
  53. migrations,
  54. # stuff to not inspect at all
  55. node_modules,
  56. .git,
  57. .tox,
  58. *.pyc,
  59. __pycache__,
  60. instance,
  61. dist,
  62. build,
  63. docs
  64. [pytest]
  65. addopts = -vvl --strict --capture fd -W error::flaskbb.deprecation.FlaskBBDeprecation
  66. norecursedirs = node_modules