Skip to content

Commit 06de8c8

Browse files
Moving from buildout to virtualenv.
1 parent 8ab33c1 commit 06de8c8

9 files changed

+40
-45
lines changed

autofixture_tests/manage.py

-16
This file was deleted.

autofixture_tests/models.py

Whitespace-only changes.

buildout.cfg

-19
This file was deleted.

fabfile.py

-8
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,6 @@
33
from fabric.api import abort, cd, local, env, run, settings, sudo
44

55

6-
#######################
7-
# Development helpers #
8-
#######################
9-
10-
def devinit():
11-
local('test -e bin/buildout || python bootstrap.py', capture=False)
12-
local('bin/buildout', capture=False)
13-
146
#################
157
# Documentation #
168
#################

manage.py

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
#!/usr/bin/env python
2+
import os
3+
4+
os.environ['DJANGO_SETTINGS_MODULE'] = 'settings'
5+
6+
7+
if __name__ == '__main__':
8+
from django.core.management import execute_from_command_line
9+
execute_from_command_line()

requirements.txt

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
django
2+
django-extensions

runtests.py

+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
#!/usr/bin/env python
2+
import os, sys
3+
4+
os.environ['DJANGO_SETTINGS_MODULE'] = 'settings'
5+
parent = os.path.dirname(os.path.abspath(__file__))
6+
7+
sys.path.insert(0, parent)
8+
9+
from django.test.simple import run_tests
10+
11+
12+
def runtests():
13+
failures = run_tests(
14+
[
15+
'autofixture',
16+
'autofixture_tests',
17+
'autofixture_test',
18+
'generator_test',
19+
'sample_app',
20+
],
21+
verbosity=1, interactive=True)
22+
sys.exit(failures)
23+
24+
if __name__ == '__main__':
25+
runtests()

autofixture_tests/settings.py settings.py

+3-2
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737

3838
# Absolute path to the directory that holds media.
3939
# Example: "/home/media/media.lawrence.com/"
40-
MEDIA_ROOT = os.path.join(PROJECT_ROOT, 'media')
40+
MEDIA_ROOT = os.path.join(PROJECT_ROOT, 'autofixture_tests', 'media')
4141

4242
# URL that handles the media served from MEDIA_ROOT. Make sure to use a
4343
# trailing slash if there is a path component (optional in other cases).
@@ -69,7 +69,7 @@
6969
ROOT_URLCONF = 'autofixture_tests.urls'
7070

7171
TEMPLATE_DIRS = (
72-
os.path.join(PROJECT_ROOT, 'templates'),
72+
os.path.join(PROJECT_ROOT, 'autofixture_tests', 'templates'),
7373
)
7474

7575
INSTALLED_APPS = (
@@ -81,6 +81,7 @@
8181

8282
'django_extensions',
8383

84+
'autofixture_tests',
8485
'autofixture_tests.sample_app',
8586
'autofixture_tests.autofixture_test',
8687
'autofixture_tests.generator_test',

setup.py

+1
Original file line numberDiff line numberDiff line change
@@ -54,4 +54,5 @@ def split(self, *args, **kw):
5454
'autofixture.management',
5555
'autofixture.management.commands'],
5656
install_requires = ['setuptools'],
57+
test_suite = 'runtests.runtests',
5758
)

0 commit comments

Comments
 (0)