<commit_before># python setup.py test
#   or
# python runtests.py

import sys
from django.conf import settings

APP = 'djrill'

settings.configure(
    DEBUG=True,
    DATABASES={
        'default': {
            'ENGINE': 'django.db.backends.sqlite3',
        }
    },
    ROOT_URLCONF=APP+'.urls',
    INSTALLED_APPS=(
        'django.contrib.auth',
        'django.contrib.contenttypes',
        'django.contrib.sessions',
        'django.contrib.admin',
        APP,
    )
)

try:
    # Django 1.7+ initialize app registry
    from django import setup
    setup()
except ImportError:<commit_msg>Fix tests in Django 1.7<commit_after># python setup.py test
#   or
# python runtests.py

import sys
from django.conf import settings

APP = 'djrill'

settings.configure(
    DEBUG=True,
    DATABASES={
        'default': {
            'ENGINE': 'django.db.backends.sqlite3',
        }
    },
    ROOT_URLCONF=APP+'.urls',
    INSTALLED_APPS=(
        'django.contrib.auth',
        'django.contrib.contenttypes',
        'django.contrib.sessions',
        'django.contrib.admin',
        APP,
    ),
    MIDDLEWARE_CLASSES=(
        'django.middleware.common.CommonMiddleware',
        'django.contrib.sessions.middleware.SessionMiddleware',
        'django.middleware.csrf.CsrfViewMiddleware',
        'django.contrib.auth.middleware.AuthenticationMiddleware',
    )
)

try:
    # Django 1.7+ initialize app registry
    from django import setup
    setup()
except ImportError:
{'fraction_non_alphanumeric': 0.11848341232227488, 'fraction_numerical': 0.005416384563303994, 'mean_word_length': 2.535885167464115, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7406602', 'n_tokens_mistral': 486, 'n_tokens_neox': 468, 'n_words': 90}