<commit_before>"""
.. module:: company.package.tests
    :platform: Unix
    :synopsis:

.. moduleauthor:: Your Name <email address>
"""

import os

import logging

import company.package.config
import company.package.logging


LOGGING_CONFIG_FILE = '%s/tests/logging.conf' % os.curdir
PACKAGE_CONFIG_FILE = '%s/tests/package.cfg' % os.curdir


class Basic(object):
    """
    Basic functionality to enhance test cases.
    """

    __slots__ = ('configuration', 'logger')

    configuration_loaded = False
    logging_loaded = False

    def setup_configuration(self):
        """
        Setup test configuration.
        It will also load (once) the test configuration.

        :param name: the name of the logger.
        :type name: str
        """
        logging.getLogger('%s.%s' % (__name__, 'BaseTestCase')).info('setup_configuration()')

        if not Basic.configuration_loaded:
            company.package.config.load_configuration(PACKAGE_CONFIG_FILE)
            Basic.configuration_loaded = True

        self.configuration = company.package.config.get()

    def setup_logger(self, name):
        """
        Setup test logger.
        It will also load (once) the test logging configuration.

        :param name: the name of the logger.
        :type name: str
        """
        logging.getLogger('%s.%s' % (__name__, 'BaseTestCase')).info('setup_logger()')

        if not Basic.logging_loaded:
            company.package.logging.load_configuration(LOGGING_CONFIG_FILE)
            Basic.logging_loaded = True

        self.logger = logging.getLogger(name)<commit_msg>fixed logger name.<commit_after>"""
.. module:: company.package.tests
    :platform: Unix
    :synopsis:

.. moduleauthor:: Your Name <email address>
"""

import os

import logging

import company.package.config
import company.package.logging


LOGGING_CONFIG_FILE = '%s/tests/logging.conf' % os.curdir
PACKAGE_CONFIG_FILE = '%s/tests/package.cfg' % os.curdir


class Basic(object):
    """
    Basic functionality to enhance test cases.
    """

    __slots__ = ('configuration', 'logger')

    configuration_loaded = False
    logging_loaded = False

    def setup_configuration(self):
        """
        Setup test configuration.
        It will also load (once) the test configuration.

        :param name: the name of the logger.
        :type name: str
        """
        logging.getLogger('%s.%s' % (__name__, 'Basic')).info('setup_configuration()')

        if not Basic.configuration_loaded:
            company.package.config.load_configuration(PACKAGE_CONFIG_FILE)
            Basic.configuration_loaded = True

        self.configuration = company.package.config.get()

    def setup_logger(self, name):
        """
        Setup test logger.
        It will also load (once) the test logging configuration.

        :param name: the name of the logger.
        :type name: str
        """
        logging.getLogger('%s.%s' % (__name__, 'Basic')).info('setup_logger()')

        if not Basic.logging_loaded:
            company.package.logging.load_configuration(LOGGING_CONFIG_FILE)
            Basic.logging_loaded = True

        self.logger = logging.getLogger(name)
{'fraction_non_alphanumeric': 0.11104120792702107, 'fraction_numerical': 0.0, 'mean_word_length': 2.697674418604651, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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': '185980', 'n_tokens_mistral': 889, 'n_tokens_neox': 861, 'n_words': 221}