<commit_before>import os
import sys


os.environ['DJANGO_SETTINGS_MODULE'] = 'test_settings'
test_dir = os.path.dirname(__file__)
sys.path.insert(0, test_dir)

from django.test.utils import get_runner
from django.conf import settings


def runtests():
    TestRunner = get_runner(settings)
    test_runner = TestRunner(verbosity=1, interactive=True)
    failures = test_runner.run_tests(['geelweb.django.editos'])
    sys.exit(bool(failures))
<commit_msg>Upgrade to test using django 1.7 and 1.8<commit_after>import os
import sys


os.environ['DJANGO_SETTINGS_MODULE'] = 'test_settings'
test_dir = os.path.dirname(__file__)
sys.path.insert(0, test_dir)

import django
from django.test.utils import get_runner
from django.conf import settings


def runtests():
    if django.VERSION[0] == 1 and django.VERSION[1] < 7:
        from django.test.utils import setup_test_environment
        setup_test_environment()

    if django.VERSION[0] == 1 and django.VERSION[1] >= 7:
        django.setup()

    TestRunner = get_runner(settings)
    test_runner = TestRunner()
    failures = test_runner.run_tests(['geelweb.django.editos'])
    sys.exit(bool(failures))

{'fraction_non_alphanumeric': 0.1115916955017301, 'fraction_numerical': 0.012975778546712802, 'mean_word_length': 4.616504854368932, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 4, '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': '7573409', 'n_tokens_mistral': 385, 'n_tokens_neox': 376, 'n_words': 82}