tox.ini 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. # Tox (http://tox.testrun.org/) is a tool for running tests in multiple
  2. # virtualenvs. This configuration file helps to run the test suite on all
  3. # supported Python versions. To use it, "pip install tox" and then run "tox"
  4. # from this directory.
  5. [tox]
  6. skipsdist = true
  7. envlist =
  8. py3
  9. flake8
  10. docs
  11. isort
  12. # Add environments to use default python2 and python3 installations
  13. [testenv:py2]
  14. basepython = python2
  15. [testenv:py3]
  16. basepython = python3
  17. [testenv]
  18. usedevelop = true
  19. passenv = DJANGO_SETTINGS_MODULE
  20. deps =
  21. py{2,27}: -rtests/requirements/py2.txt
  22. py{3,34,35}: -rtests/requirements/py3.txt
  23. postgres: -rtests/requirements/postgres.txt
  24. mysql: -rtests/requirements/mysql.txt
  25. oracle: -rtests/requirements/oracle.txt
  26. changedir = tests
  27. commands =
  28. {envpython} runtests.py {posargs}
  29. [testenv:flake8]
  30. basepython = python3
  31. usedevelop = false
  32. deps = flake8
  33. changedir = {toxinidir}
  34. commands = flake8 .
  35. [testenv:docs]
  36. # On OS X, as of pyenchant 1.6.6, the docs build only works under Python 2.
  37. basepython = python2
  38. usedevelop = false
  39. whitelist_externals =
  40. make
  41. deps =
  42. Sphinx
  43. pyenchant
  44. sphinxcontrib-spelling
  45. changedir = docs
  46. commands =
  47. make spelling
  48. [testenv:isort]
  49. basepython = python3
  50. usedevelop = false
  51. deps = isort
  52. changedir = {toxinidir}
  53. commands = isort --recursive --check-only --diff django tests scripts
  54. [testenv:javascript]
  55. usedevelop = false
  56. deps =
  57. changedir = {toxinidir}
  58. whitelist_externals = npm
  59. commands =
  60. npm install
  61. npm test