Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Moving from buildout to virtualenv.

  • Loading branch information...
commit 06de8c860b21d3603f83118466df9afbb806501c 1 parent 8ab33c1
@gregmuellegger authored
View
16 autofixture_tests/manage.py
@@ -1,16 +0,0 @@
-#!/usr/bin/env python
-import sys,os
-sys.path.insert(0,
- os.path.dirname(os.path.dirname(
- os.path.abspath(__file__))))
-
-from django.core.management import execute_manager
-try:
- import settings # Assumed to be in the same directory.
-except ImportError:
- import sys
- sys.stderr.write("Error: Can't find the file 'settings.py' in the directory containing %r. It appears you've customized things.\nYou'll have to run django-admin.py, passing it your settings module.\n(If the file settings.py does indeed exist, it's causing an ImportError somehow.)\n" % __file__)
- sys.exit(1)
-
-if __name__ == "__main__":
- execute_manager(settings)
View
0  autofixture_tests/models.py
No changes.
View
19 buildout.cfg
@@ -1,19 +0,0 @@
-[buildout]
-parts = python django
-eggs =
- django-extensions
-unzip = true
-
-[python]
-recipe = zc.recipe.egg
-interpreter = python
-eggs = ${buildout:eggs}
-
-[django]
-recipe = djangorecipe
-version = 1.2.1
-project = autofixture_tests
-projectegg = autofixture_tests
-settings = settings
-test = autofixture autofixture_test generator_test
-eggs = ${buildout:eggs}
View
8 fabfile.py
@@ -3,14 +3,6 @@
from fabric.api import abort, cd, local, env, run, settings, sudo
-#######################
-# Development helpers #
-#######################
-
-def devinit():
- local('test -e bin/buildout || python bootstrap.py', capture=False)
- local('bin/buildout', capture=False)
-
#################
# Documentation #
#################
View
9 manage.py
@@ -0,0 +1,9 @@
+#!/usr/bin/env python
+import os
+
+os.environ['DJANGO_SETTINGS_MODULE'] = 'settings'
+
+
+if __name__ == '__main__':
+ from django.core.management import execute_from_command_line
+ execute_from_command_line()
View
2  requirements.txt
@@ -0,0 +1,2 @@
+django
+django-extensions
View
25 runtests.py
@@ -0,0 +1,25 @@
+#!/usr/bin/env python
+import os, sys
+
+os.environ['DJANGO_SETTINGS_MODULE'] = 'settings'
+parent = os.path.dirname(os.path.abspath(__file__))
+
+sys.path.insert(0, parent)
+
+from django.test.simple import run_tests
+
+
+def runtests():
+ failures = run_tests(
+ [
+ 'autofixture',
+ 'autofixture_tests',
+ 'autofixture_test',
+ 'generator_test',
+ 'sample_app',
+ ],
+ verbosity=1, interactive=True)
+ sys.exit(failures)
+
+if __name__ == '__main__':
+ runtests()
View
5 autofixture_tests/settings.py → settings.py
@@ -37,7 +37,7 @@
# Absolute path to the directory that holds media.
# Example: "/home/media/media.lawrence.com/"
-MEDIA_ROOT = os.path.join(PROJECT_ROOT, 'media')
+MEDIA_ROOT = os.path.join(PROJECT_ROOT, 'autofixture_tests', 'media')
# URL that handles the media served from MEDIA_ROOT. Make sure to use a
# trailing slash if there is a path component (optional in other cases).
@@ -69,7 +69,7 @@
ROOT_URLCONF = 'autofixture_tests.urls'
TEMPLATE_DIRS = (
- os.path.join(PROJECT_ROOT, 'templates'),
+ os.path.join(PROJECT_ROOT, 'autofixture_tests', 'templates'),
)
INSTALLED_APPS = (
@@ -81,6 +81,7 @@
'django_extensions',
+ 'autofixture_tests',
'autofixture_tests.sample_app',
'autofixture_tests.autofixture_test',
'autofixture_tests.generator_test',
View
1  setup.py
@@ -54,4 +54,5 @@ def split(self, *args, **kw):
'autofixture.management',
'autofixture.management.commands'],
install_requires = ['setuptools'],
+ test_suite = 'runtests.runtests',
)
Please sign in to comment.
Something went wrong with that request. Please try again.