mirror of
https://github.com/jazzband/django-configurations.git
synced 2026-03-16 22:20:27 +00:00
Use py.test.
Signed-off-by: Jannis Leidel <jannis@leidel.info>
This commit is contained in:
parent
aba18a4cd8
commit
7799241900
5 changed files with 16 additions and 26 deletions
|
|
@ -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
manage.py
11
manage.py
|
|
@ -1,11 +0,0 @@
|
|||
#!/usr/bin/env python
|
||||
import os
|
||||
import sys
|
||||
|
||||
if __name__ == "__main__":
|
||||
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'tests.settings.main')
|
||||
os.environ.setdefault('DJANGO_CONFIGURATION', 'Test')
|
||||
|
||||
from configurations.management import execute_from_command_line
|
||||
|
||||
execute_from_command_line(sys.argv)
|
||||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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',
|
||||
|
|
|
|||
18
tox.ini
18
tox.ini
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in a new issue