<commit_before># Disable deprecation warnings in production mode
import os.path
import sys
import warnings
warnings.simplefilter('ignore', DeprecationWarning)
warnings.simplefilter('ignore', PendingDeprecationWarning)

# Enable pyopenssl based SSL stack
if sys.version_info < (3, 0):  # pragma: no cover
    from requests.packages.urllib3.contrib import pyopenssl
    pyopenssl.inject_into_urllib3()
    del pyopenssl

ROOT = os.path.abspath(os.path.dirname(__file__))


def setup_package(module):
    # nosetests package level fixture setup

    # We do this here as early as possible in tests.
    # We only do it in tests, as the real celery processes should
    # run without the monkey patches applied. The gunicorn arbiter
    # patches its worker processes itself.
    from gevent import monkey
    monkey.patch_all()

    # enable all warnings in test mode
    warnings.resetwarnings()
    warnings.simplefilter('default')

    from ichnaea.tests.base import setup_package
    return setup_package(module)

<commit_msg>Silence new MySQL warnings showing up in 5.6.27.<commit_after># Disable deprecation warnings in production mode
import os.path
import sys
import warnings

from pymysql import err

warnings.simplefilter('ignore', DeprecationWarning)
warnings.simplefilter('ignore', PendingDeprecationWarning)
warnings.simplefilter('ignore', err.Warning)

# Enable pyopenssl based SSL stack
if sys.version_info < (3, 0):  # pragma: no cover
    from requests.packages.urllib3.contrib import pyopenssl
    pyopenssl.inject_into_urllib3()
    del pyopenssl

ROOT = os.path.abspath(os.path.dirname(__file__))


def setup_package(module):
    # nosetests package level fixture setup

    # We do this here as early as possible in tests.
    # We only do it in tests, as the real celery processes should
    # run without the monkey patches applied. The gunicorn arbiter
    # patches its worker processes itself.
    from gevent import monkey
    monkey.patch_all()

    # enable all warnings in test mode
    warnings.resetwarnings()
    warnings.simplefilter('default')
    warnings.simplefilter('ignore', err.Warning)

    from ichnaea.tests.base import setup_package
    return setup_package(module)


{'fraction_non_alphanumeric': 0.07016749660479855, 'fraction_numerical': 0.005432322317790856, 'mean_word_length': 4.1756440281030445, 'pattern_counts': {'":': 0, '<': 5, '<?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': '6094843', 'n_tokens_mistral': 648, 'n_tokens_neox': 618, 'n_words': 215}