tox.ini 1.6 KB

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