tox.ini 1.6 KB

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