Skip to content

Commit

Permalink
Use py.test.
Browse files Browse the repository at this point in the history
Signed-off-by: Jannis Leidel <jannis@leidel.info>
  • Loading branch information
jezdez committed Jan 6, 2015
1 parent aba18a4 commit 7799241
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 26 deletions.
1 change: 0 additions & 1 deletion MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
include README.rst
include AUTHORS
include .travis.yml
include manage.py
include tasks.py
recursive-include tests *
recursive-include docs *
11 changes: 0 additions & 11 deletions manage.py

This file was deleted.

9 changes: 9 additions & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
@@ -1,2 +1,11 @@
[pytest]
django_find_project = false
addopts = --cov configurations
DJANGO_SETTINGS_MODULE = tests.settings.main
DJANGO_CONFIGURATION = Test

[wheel]
universal = 1

[flake8]
ignore = E124,E501,E127,E128
3 changes: 0 additions & 3 deletions tests/settings/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,6 @@ class Test(Configuration):

ROOT_URLCONF = 'tests.urls'

if django.VERSION[:2] < (1, 6):
TEST_RUNNER = 'discover_runner.DiscoverRunner'

def TEMPLATE_CONTEXT_PROCESSORS(self):
return Configuration.TEMPLATE_CONTEXT_PROCESSORS + (
'tests.settings.base.test_callback',
Expand Down
18 changes: 7 additions & 11 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -20,31 +20,27 @@ basepython =
pypy: pypy
usedevelop = true
deps =
django-discover-runner
mock
dj-database-url
dj-email-url
dj-search-url
django-cache-url>=0.6.0
six
pytest-django
pytest-cov
dj14: https://github.com/django/django/archive/stable/1.4.x.zip#egg=django
dj15: https://github.com/django/django/archive/stable/1.5.x.zip#egg=django
dj16: https://github.com/django/django/archive/stable/1.6.x.zip#egg=django
dj17: https://github.com/django/django/archive/stable/1.7.x.zip#egg=django
dj18: https://github.com/django/django/archive/master.zip#egg=django
flake8: flake8
coverage: coverage

commands =
python manage.py test -v2 {posargs:tests}
py.test {posargs:}

[testenv:flake8-py27]
commands = flake8 configurations --ignore=E501,E127,E128,E124
commands = flake8 configurations
deps = flake8

[testenv:flake8-py33]
commands = flake8 configurations --ignore=E501,E127,E128,E124

[testenv:coverage-py27-dj16]
commands = coverage erase
coverage run manage.py test -v2 {posargs:tests}
coverage report
commands = flake8 configurations
deps = flake8

0 comments on commit 7799241

Please sign in to comment.