<commit_before>#! /usr/bin/env python
"""From http://stackoverflow.com/a/12260597/400691"""
import sys

from colour_runner.django_runner import ColourRunnerMixin
import dj_database_url
import django
from django.conf import settings
from django.test.runner import DiscoverRunner



settings.configure(
    DATABASES={
        'default': dj_database_url.config(default='postgres://localhost/conman'),
    },
    DEFAULT_FILE_STORAGE='inmemorystorage.InMemoryStorage',
    INSTALLED_APPS=(
        # Put contenttypes before auth to work around test issue.
        # See: https://code.djangoproject.com/ticket/10827#comment:12
        'django.contrib.sites',
        'django.contrib.contenttypes',
        'django.contrib.auth',
        'django.contrib.sessions',
        'django.contrib.admin',
        'conman.nav_tree',
    ),
    PASSWORD_HASHERS = ('django.contrib.auth.hashers.MD5PasswordHasher',),
    SITE_ID = 1,
    ROOT_URLCONF='conman.nav_tree.urls',
    MIDDLEWARE_CLASSES=(),
    NAV_NODE_HANDLERS=(),
)


django.setup()


class TestRunner(ColourRunnerMixin, DiscoverRunner):
    pass


test_runner = TestRunner(verbosity=1)
failures = test_runner.run_tests(['conman'])
if failures:
    sys.exit(1)
<commit_msg>Whitespace<commit_after>#! /usr/bin/env python
"""From http://stackoverflow.com/a/12260597/400691"""
import sys

from colour_runner.django_runner import ColourRunnerMixin
import dj_database_url
import django
from django.conf import settings
from django.test.runner import DiscoverRunner


settings.configure(
    DATABASES={
        'default': dj_database_url.config(default='postgres://localhost/conman'),
    },
    DEFAULT_FILE_STORAGE='inmemorystorage.InMemoryStorage',
    INSTALLED_APPS=(
        # Put contenttypes before auth to work around test issue.
        # See: https://code.djangoproject.com/ticket/10827#comment:12
        'django.contrib.sites',
        'django.contrib.contenttypes',
        'django.contrib.auth',
        'django.contrib.sessions',
        'django.contrib.admin',
        'conman.nav_tree',
    ),
    PASSWORD_HASHERS = ('django.contrib.auth.hashers.MD5PasswordHasher',),
    SITE_ID = 1,
    ROOT_URLCONF='conman.nav_tree.urls',
    MIDDLEWARE_CLASSES=(),
    NAV_NODE_HANDLERS=(),
)

django.setup()


class TestRunner(ColourRunnerMixin, DiscoverRunner):
    pass


test_runner = TestRunner(verbosity=1)
failures = test_runner.run_tests(['conman'])
if failures:
    sys.exit(1)

{'fraction_non_alphanumeric': 0.12064013130898646, 'fraction_numerical': 0.02051702913418137, 'mean_word_length': 3.8857715430861726, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 2, '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': '3893550', 'n_tokens_mistral': 845, 'n_tokens_neox': 786, 'n_words': 130}