<commit_before>#!/usr/bin/env python
# encoding: utf-8
import shutil, os, re, unittest, logging, datetime, time, sys, shutil
from os.path import isfile, isdir

from django.contrib.auth.models import User
from django.test import TestCase as DjangoTestCase
from django.conf import settings
from django.http import HttpResponseNotFound
import django.utils.translation as translation

from bookworm.search import epubindexer, index
from bookworm.library.models import *
from bookworm.library.testmodels import *
from bookworm.library.epub.toc import TOC
from bookworm.library.epub.constants import *

from twill import get_browser
from twill.errors import TwillAssertionError
from twill import add_wsgi_intercept
from twill.commands import *



settings.SITE_ID = 1

# Delete the cache from earlier runs (otherwise some templates
# will not return a response)
try:
    shutil.rmtree(settings.CACHE_BACKEND.replace('file://', ''))
except:
    pass

# Data for public epub documents
DATA_DIR = unicode(os.path.abspath('./library/test-data/data'))<commit_msg>Changing charset of test data<commit_after>#!/usr/bin/env python
# encoding: utf-8
import shutil, os, re, unittest, logging, datetime, time, sys, shutil
from os.path import isfile, isdir

from django.contrib.auth.models import User
from django.test import TestCase as DjangoTestCase
from django.conf import settings
from django.http import HttpResponseNotFound
import django.utils.translation as translation

from bookworm.search import epubindexer, index
from bookworm.library.models import *
from bookworm.library.testmodels import *
from bookworm.library.epub.toc import TOC
from bookworm.library.epub.constants import *

from twill import get_browser
from twill.errors import TwillAssertionError
from twill import add_wsgi_intercept
from twill.commands import *


settings.SITE_ID = 1

# Delete the cache from earlier runs (otherwise some templates
# will not return a response)
try:
    shutil.rmtree(settings.CACHE_BACKEND.replace('file://', ''))
except:
    pass

# Data for public epub documents
DATA_DIR = unicode(os.path.abspath('./library/test-data/data'))
{'fraction_non_alphanumeric': 0.08022652194431336, 'fraction_numerical': 0.0018876828692779614, 'mean_word_length': 5.309523809523809, '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': '7626723', 'n_tokens_mistral': 636, 'n_tokens_neox': 609, 'n_words': 205}