Skip to content

Commit c744813

Browse files
Tox testing config file added
1 parent f87108d commit c744813

File tree

6 files changed

+17
-19
lines changed

6 files changed

+17
-19
lines changed

fabfile.py

Lines changed: 1 addition & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -35,24 +35,7 @@ def init_venv():
3535

3636

3737
def test():
38-
with cd(root):
39-
with _virtualenv():
40-
with shell_env(DJANGO_SETTINGS_MODULE='test_django_settings'):
41-
local(' '.join((
42-
'django-admin.py',
43-
'test',
44-
'mailqueue',
45-
'--pythonpath=./',
46-
# '--with-coverage',
47-
# '--with-doctest',
48-
# '--doctest-tests',
49-
# '--verbose',
50-
# '--cover-package=mailqueue',
51-
# # '--cover-html',
52-
# # '--cover-html-dir=coverage-html-report',
53-
)).format(
54-
project=project,
55-
))
38+
local('tox')
5639

5740

5841
def build():

mailqueue/tests/test_email.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@
55
from django.utils import timezone
66
from django.test import TestCase
77

8-
from ..mailqueue import add_templated_mail, MailerMessage, process, add_mail, clean, conf
8+
from ..mailqueue import add_templated_mail, MailerMessage, process, add_mail, clean
9+
from .. import conf
910

1011

1112
class TestEmail(TestCase):

setup.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
packages=[
1111
'mailqueue',
1212
'mailqueue.migrations',
13+
'mailqueue.tests',
1314
],
1415
package_data={
1516
'mailqueue': ['templates/*'],

test_app/__init__.py

Whitespace-only changes.
File renamed without changes.

tox.ini

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
[tox]
2+
envlist = py27-django-{latest,18}
3+
4+
[testenv]
5+
deps =
6+
django-latest: django
7+
django-18: django>=1.8, <1.9
8+
django-nose
9+
setenv =
10+
DJANGO_SETTINGS_MODULE=test_app.settings
11+
PYTHONPATH={toxinidir}
12+
commands =
13+
django-admin.py test mailqueue

0 commit comments

Comments
 (0)