mirror of
https://github.com/django/daphne.git
synced 2025-04-21 01:02:06 +03:00
Add tox and run tests for python 2.7/3.5 and Django 1.6-1.8
This commit is contained in:
parent
57f21d71e2
commit
351a18ba07
3
.gitignore
vendored
3
.gitignore
vendored
|
@ -2,5 +2,6 @@
|
|||
dist/
|
||||
docs/_build
|
||||
__pycache__/
|
||||
.tox/
|
||||
*.swp
|
||||
|
||||
*.pyc
|
||||
|
|
7
channels/tests/settings.py
Normal file
7
channels/tests/settings.py
Normal file
|
@ -0,0 +1,7 @@
|
|||
SECRET_KEY = 'cat'
|
||||
|
||||
DATABASES = {
|
||||
'default': {
|
||||
'ENGINE': 'django.db.backends.sqlite3',
|
||||
}
|
||||
}
|
15
runtests.py
Normal file
15
runtests.py
Normal file
|
@ -0,0 +1,15 @@
|
|||
#!/usr/bin/env python
|
||||
import os
|
||||
import sys
|
||||
|
||||
import django
|
||||
from django.conf import settings
|
||||
from django.test.utils import get_runner
|
||||
|
||||
if __name__ == "__main__":
|
||||
os.environ['DJANGO_SETTINGS_MODULE'] = "channels.tests.settings"
|
||||
django.setup()
|
||||
TestRunner = get_runner(settings)
|
||||
test_runner = TestRunner()
|
||||
failures = test_runner.run_tests(["channels.tests"])
|
||||
sys.exit(bool(failures))
|
16
tox.ini
Normal file
16
tox.ini
Normal file
|
@ -0,0 +1,16 @@
|
|||
[tox]
|
||||
skipsdist = True
|
||||
envlist =
|
||||
{py27,py35}-django-{16,17,18}
|
||||
|
||||
[testenv]
|
||||
setenv =
|
||||
PYTHONPATH = {toxinidir}:{toxinidir}
|
||||
deps =
|
||||
six
|
||||
redis==2.10.5
|
||||
django-16: Django>=1.6,<1.7
|
||||
django-17: Django>=1.7,<1.8
|
||||
django-18: Django>=1.8,<1.9
|
||||
commands =
|
||||
python {toxinidir}/runtests.py
|
Loading…
Reference in New Issue
Block a user