Permalink
Browse files

testrunner

  • Loading branch information...
1 parent 06d4f5a commit c5a4789b3a979d0fea9b1e0deebed91cc0e30cac Shaun Sephton committed Aug 30, 2011
Showing with 19 additions and 10 deletions.
  1. +6 −10 setup.py
  2. +13 −0 test_settings.py
View
@@ -1,14 +1,11 @@
from setuptools import setup, find_packages
from setuptools.command.test import test
-class TestRunner(test):
- def run(self, *args, **kwargs):
- if self.distribution.install_requires:
- self.distribution.fetch_build_eggs(self.distribution.install_requires)
- if self.distribution.tests_require:
- self.distribution.fetch_build_eggs(self.distribution.tests_require)
- from runtests import runtests
- runtests()
+def run_tests(self):
+ from setuptest.runtests import runtests
+ return runtests(self)
+test.run_tests = run_tests
+
setup(
name='django-object-tools',
version='0.0.2',
@@ -20,10 +17,9 @@ def run(self, *args, **kwargs):
packages = find_packages(),
include_package_data=True,
test_suite = "object_tools.tests",
- cmdclass={"test": TestRunner},
tests_require = [
'django-snippetscream',
- 'django>=1.3',
+ 'django-setuptest',
],
classifiers = [
"Programming Language :: Python",
View
@@ -0,0 +1,13 @@
+DEBUG = True
+
+DATABASE_ENGINE = 'sqlite3'
+
+INSTALLED_APPS = [
+ 'django.contrib.contenttypes',
+ 'django.contrib.auth',
+ 'django.contrib.admin',
+ 'django.contrib.sessions',
+ 'object_tools',
+ 'object_tools.tests',
+]
+ROOT_URLCONF = 'object_tools.tests.urls'

0 comments on commit c5a4789

Please sign in to comment.