tox.ini 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  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. deps = coverage
  21. commands =
  22. coverage combine tests
  23. coverage report
  24. [testenv:codecov]
  25. skip_install = true
  26. deps = codecov
  27. commands =
  28. coverage combine tests
  29. codecov
  30. coverage report
  31. [testenv:black]
  32. skip_install = true
  33. deps = black
  34. basepython=python3.7
  35. commands = black --check tests/ flaskbb/
  36. [testenv:flake8]
  37. skip_install = true
  38. basepython=python3.7
  39. commands =
  40. flake8 --version
  41. flake8 --config={toxinidir}/tox.ini {toxinidir}/flaskbb {toxinidir}/tests
  42. [flake8]
  43. # B = bugbear
  44. # E = pycodestyle errors
  45. # F = flake8 pyflakes
  46. # W = pycodestyle warnings
  47. # B9 = bugbear opinions
  48. ignore = E203, E712, E711, W503
  49. select = C,E,F,W,B,B9
  50. max-complexity = 10
  51. max-line-length = 88
  52. exclude =
  53. # allowed to break the rules
  54. flaskbb/configs/default.py,
  55. flaskbb/_compat.py,
  56. # migrations are autogenerated
  57. migrations,
  58. # stuff to not inspect at all
  59. node_modules,
  60. .git,
  61. .tox,
  62. *.pyc,
  63. __pycache__,
  64. instance,
  65. dist,
  66. build,
  67. docs
  68. [pytest]
  69. addopts = -vvl --strict --capture fd -W error::flaskbb.deprecation.FlaskBBDeprecation
  70. norecursedirs = node_modules