<commit_before>#!/usr/bin/env python
# -*- coding: utf-8 -*-
import os, sys
from django.conf import settings
from django.test.runner import DiscoverRunner


os.environ['DJANGO_SETTINGS_MODULE'] = 'tests.test_settings'

test_runner = DiscoverRunner(verbosity=1)

failures = test_runner.run_tests(['zesty_metrics'])
if failures:
    sys.exit(bool(failures))
<commit_msg>setup django apps before running tests<commit_after>#!/usr/bin/env python
# -*- coding: utf-8 -*-
import os, sys
import django
from django.conf import settings
from django.test.runner import DiscoverRunner


os.environ['DJANGO_SETTINGS_MODULE'] = 'tests.test_settings'
django.setup()

test_runner = DiscoverRunner(verbosity=1)

failures = test_runner.run_tests(['zesty_metrics'])
if failures:
    sys.exit(bool(failures))

{'fraction_non_alphanumeric': 0.12531645569620253, 'fraction_numerical': 0.005063291139240506, 'mean_word_length': 5.818965517241379, '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': '854849', 'n_tokens_mistral': 260, 'n_tokens_neox': 253, 'n_words': 56}