<commit_before>from flask.ext.testing import TestCase
from project import create_app as app_factory
from project.extensions import db
from project.fixtures import load_fixtures


class ProjectTestCase(TestCase):
    """
    Base class for all tests in project
    """

    def create_app(self):
        app = app_factory()
        with app.app_context():
            db.create_all()
            load_fixtures(app.config['FIXTURES_DIR'])
        return app<commit_msg>special base test class with setUp once<commit_after>from flask.ext.testing import TestCase
from project import create_app as app_factory
from project.extensions import db
from project.fixtures import load_fixtures


class ProjectTestCase(TestCase):
    """
    Base class for all tests in project
    """

    def create_app(self):
        app = app_factory()
        with app.app_context():
            db.create_all()
            load_fixtures(app.config['FIXTURES_DIR'])
        return app


class ProjectTestCaseSetupOnce(ProjectTestCase):
    """
    magic to run _setUp Once
    """
    setupHappened = False

    def setUp(self):
        if (self.setupHappened):
            pass
        else:
            self.doSetUp()
            self.setupHappened = True

    def doSetUp(self):
        pass
{'fraction_non_alphanumeric': 0.07716535433070866, 'fraction_numerical': 0.0, 'mean_word_length': 2.641833810888252, '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': '1167279', 'n_tokens_mistral': 357, 'n_tokens_neox': 345, 'n_words': 100}