tox.ini 1.5 KB

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