Skip to content

Commit

Permalink
Turned runtest.sh+buildout+magic into runtests.py+awesomeness
Browse files Browse the repository at this point in the history
  • Loading branch information
Jonas Obrist committed Oct 22, 2011
1 parent 3de7d6f commit 4332963
Show file tree
Hide file tree
Showing 41 changed files with 56 additions and 310 deletions.
56 changes: 56 additions & 0 deletions runtests.py
@@ -0,0 +1,56 @@
# -*- coding: utf-8 -*-
import os
import sys

urlpatterns = []

TEMPLATE_DEBUG = True

DATABASES = {
'default': {
'ENGINE': 'sqlite3',
'NAME': ':memory:'
}
}


INSTALLED_APPS = [
'sekizai',
]

TEMPLATE_DIRS = [
os.path.join(os.path.dirname(__file__), 'test_templates'),
]

TEMPLATE_CONTEXT_PROCESSORS = [
'sekizai.context_processors.sekizai',
]


ROOT_URLCONF = 'runtests'

def run_tests():
from django.conf import settings
settings.configure(
INSTALLED_APPS = INSTALLED_APPS,
ROOT_URLCONF = ROOT_URLCONF,
DATABASES = DATABASES,
TEST_RUNNER = 'django.test.simple.DjangoTestSuiteRunner',
TEMPLATE_DIRS = TEMPLATE_DIRS,
TEMPLATE_CONTEXT_PROCESSORS = TEMPLATE_CONTEXT_PROCESSORS,
TEMPLATE_DEBUG = TEMPLATE_DEBUG
)

# Run the test suite, including the extra validation tests.
from django.test.utils import get_runner
TestRunner = get_runner(settings)

test_runner = TestRunner(verbosity=1, interactive=False, failfast=False)
failures = test_runner.run_tests(INSTALLED_APPS)
return failures


if __name__ == "__main__":
failures = run_tests()
if failures:
sys.exit(bool(failures))
77 changes: 0 additions & 77 deletions runtests.sh

This file was deleted.

File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
6 changes: 0 additions & 6 deletions tests/.coveragerc

This file was deleted.

121 changes: 0 additions & 121 deletions tests/bootstrap.py

This file was deleted.

29 changes: 0 additions & 29 deletions tests/buildout.cfg

This file was deleted.

Empty file removed tests/testapp/__init__.py
Empty file.
16 changes: 0 additions & 16 deletions tests/testapp/manage.py

This file was deleted.

1 change: 0 additions & 1 deletion tests/testapp/media/css/one.css

This file was deleted.

1 change: 0 additions & 1 deletion tests/testapp/media/css/two.css

This file was deleted.

Empty file removed tests/testapp/models.py
Empty file.
41 changes: 0 additions & 41 deletions tests/testapp/settings.py

This file was deleted.

15 changes: 0 additions & 15 deletions tests/testapp/testrunner.py

This file was deleted.

3 changes: 0 additions & 3 deletions tests/testapp/urls.py

This file was deleted.

0 comments on commit 4332963

Please sign in to comment.