tox.ini 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  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 PYTHONPATH HOME DISPLAY
  20. setenv =
  21. PYTHONDONTWRITEBYTECODE=1
  22. deps =
  23. py{2,27}: -rtests/requirements/py2.txt
  24. py{3,34,35,36}: -rtests/requirements/py3.txt
  25. postgres: -rtests/requirements/postgres.txt
  26. mysql: -rtests/requirements/mysql.txt
  27. oracle: -rtests/requirements/oracle.txt
  28. changedir = tests
  29. commands =
  30. {envpython} runtests.py {posargs}
  31. [testenv:flake8]
  32. basepython = python3
  33. usedevelop = false
  34. deps = flake8
  35. changedir = {toxinidir}
  36. commands = flake8 .
  37. [testenv:docs]
  38. # On OS X, as of pyenchant 1.6.6, the docs build only works under Python 2.
  39. basepython = python2
  40. usedevelop = false
  41. whitelist_externals =
  42. make
  43. deps =
  44. Sphinx
  45. pyenchant
  46. sphinxcontrib-spelling
  47. changedir = docs
  48. commands =
  49. make spelling
  50. [testenv:isort]
  51. basepython = python3
  52. usedevelop = false
  53. deps = isort
  54. changedir = {toxinidir}
  55. commands = isort --recursive --check-only --diff django tests scripts
  56. [testenv:javascript]
  57. usedevelop = false
  58. deps =
  59. changedir = {toxinidir}
  60. whitelist_externals = npm
  61. commands =
  62. npm install
  63. npm test