tox.ini 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. [tox]
  2. envlist =
  3. py27
  4. py34
  5. py35
  6. py36
  7. coverage
  8. flake8
  9. skip_missing_interpreters = true
  10. skipsdist = false
  11. [testenv]
  12. passenv = TOXENV CI TRAVIS TRAVIS_* CODECOV_*
  13. deps = -r{toxinidir}/tests/requirements.txt
  14. commands = pytest --cov=pepper/ --cov-config=tox.ini --cov-report= {posargs}
  15. changedir = {toxinidir}
  16. setenv = COVERAGE_FILE = {toxworkdir}/.coverage.{envname}
  17. [testenv:flake8]
  18. basepython = python3
  19. deps =
  20. -r {toxinidir}/tests/requirements.txt
  21. flake8
  22. commands = flake8 tests/ pepper/ scripts/pepper setup.py
  23. [testenv:coverage]
  24. skip_install = True
  25. deps =
  26. coverage >= 4.4.1, < 5
  27. setenv = COVERAGE_FILE={toxworkdir}/.coverage
  28. changedir = {toxinidir}
  29. commands =
  30. coverage erase
  31. coverage combine
  32. coverage report -m
  33. coverage html
  34. coverage xml -o {toxworkdir}/coverage.xml
  35. [testenv:codecov]
  36. deps = codecov
  37. skip_install = True
  38. changedir = {toxinidir}
  39. commands = codecov --file "{toxworkdir}/coverage.xml"
  40. [testenv:http]
  41. skip_install = True
  42. basepython = python36
  43. deps =
  44. changedir = {toxinidir}/htmlcov
  45. commands = python -m http.server
  46. [pytest]
  47. addopts = --log-file /tmp/pepper-runtests.log --no-print-logs -ra -sv
  48. testpaths = tests
  49. norecursedirs = .git .tox
  50. usefixtures = pepperconfig
  51. [flake8]
  52. max-line-length = 119
  53. [coverage:run]
  54. branch = true
  55. source = pepper/
  56. omit =
  57. */.tox/*
  58. */tests/*
  59. */setup.py
  60. [coverage:report]
  61. skip_covered = True
  62. show_missing = True