Skip to content

Commit

Permalink
Small cleanup in generic_aggregation for simpler testing
Browse files Browse the repository at this point in the history
  • Loading branch information
coleifer committed Feb 23, 2011
1 parent 1666021 commit 7ef7b02
Show file tree
Hide file tree
Showing 6 changed files with 36 additions and 10 deletions.
File renamed without changes.
File renamed without changes.
Expand Up @@ -5,7 +5,9 @@
from django.test import TestCase

from generic_aggregation import generic_annotate, generic_aggregate
from generic_aggregation.tests.models import Food, Rating, CharFieldGFK
from generic_aggregation.generic_aggregation_tests.models import (
Food, Rating, CharFieldGFK
)

class SimpleTest(TestCase):
def setUp(self):
Expand Down
8 changes: 0 additions & 8 deletions generic_aggregation/tests/settings.py

This file was deleted.

31 changes: 31 additions & 0 deletions runtests.py
@@ -0,0 +1,31 @@
#!/usr/bin/env python
import sys
from os.path import dirname, abspath

from django.conf import settings

if not settings.configured:
settings.configure(
DATABASE_ENGINE = 'sqlite3',
# DATABASE_ENGINE = 'postgresql_psycopg2',
# DATABASE_NAME = 'test_main',
INSTALLED_APPS = [
'django.contrib.contenttypes',
'generic_aggregation.generic_aggregation_tests',
],
)

from django.test.simple import run_tests


def runtests(*test_args):
if not test_args:
test_args = ['generic_aggregation_tests']
parent = dirname(abspath(__file__))
sys.path.insert(0, parent)
failures = run_tests(test_args, verbosity=1, interactive=True)
sys.exit(failures)


if __name__ == '__main__':
runtests(*sys.argv[1:])
3 changes: 2 additions & 1 deletion setup.py
Expand Up @@ -5,7 +5,7 @@
readme = f.read()
f.close()

VERSION = (0, 1, 1)
VERSION = (0, 1, 2)

setup(
name='django-generic-aggregation',
Expand All @@ -29,4 +29,5 @@
'Programming Language :: Python',
'Framework :: Django',
],
test_suite='runtests.runtests',
)

0 comments on commit 7ef7b02

Please sign in to comment.