tox.ini 2.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  1. # Tox (http://tox.testrun.org/) is a tool for running tests
  2. # in multiple virtualenvs. This configuration file will run the
  3. # test suite on all supported python versions. To use it, "pip install tox"
  4. # and then run "tox" from this directory.
  5. # NOTE: python-apt must be available system-wide as it can't be installed
  6. # by pip, alternatively you must list it as an external dependency
  7. # with an URL like this one:
  8. # http://snapshot.debian.org/archive/debian/20130606T215913Z/pool/main/p/python-apt/python-apt_0.8.9.1.tar.gz
  9. [tox]
  10. envlist =
  11. {py27,py34,py35}-{django18,django19,django110}-unit-tests,
  12. flake8,
  13. # Ensure we have no warnings on last Django LTS
  14. py35-django18-no-warnings
  15. skipsdist = True
  16. skip_missing_interpreters = True
  17. [testenv]
  18. whitelist_externals =
  19. tox
  20. commands =
  21. unit-tests: {envpython} ./manage.py test django_email_accounts distro_tracker
  22. no-warnings: {envpython} -W error -W ignore:::site: ./manage.py test django_email_accounts distro_tracker
  23. show-warnings: {envpython} -W all ./manage.py test django_email_accounts distro_tracker
  24. functional-tests: {envpython} ./manage.py test functional_tests/
  25. check: {envpython} ./manage.py check
  26. sitepackages = True
  27. deps =
  28. django18: Django>=1.8,<1.9
  29. django19: Django>=1.9,<1.10
  30. django110: Django>=1.10,<1.11
  31. functional: Django>=1.8,<1.9
  32. coverage: coverage
  33. py27-tests: mock
  34. py27-tests: pyliblzma
  35. py27-tests: SOAPpy
  36. py27-tests: python_ldap
  37. tests: requests
  38. tests: django_jsonfield
  39. tests: django_debug_toolbar
  40. tests: pygpgme
  41. tests: PyYAML
  42. tests: python_debian
  43. tests: python_apt
  44. tests: beautifulsoup4
  45. functional-tests: selenium
  46. [testenv:flake8]
  47. commands = {envpython} -m flake8 django_email_accounts/ functional_tests/ distro_tracker/
  48. deps =
  49. flake8
  50. [flake8]
  51. max-complexity = 12
  52. max-line-length = 80
  53. exclude = .git,.ropeproject,__pycache__,distro_tracker/project/settings/local.py,*/migrations/*.py
  54. ignore = N813,N806,N802
  55. [testenv:coverage]
  56. basepython = python2.7
  57. commands =
  58. {envpython} -m coverage erase
  59. tox -e py27-coverage
  60. tox -e py35-coverage
  61. {envpython} -m coverage combine
  62. {envpython} -m coverage html
  63. [testenv:py27-coverage]
  64. commands = {envpython} -m coverage run -p ./manage.py test django_email_accounts distro_tracker
  65. [testenv:py35-coverage]
  66. commands = {envpython} -m coverage run -p ./manage.py test django_email_accounts distro_tracker