<commit_before>#!/usr/bin/env python
""" init method for sox module """
from .log import logger
import os

# Check that SoX is installed and callable
NO_SOX = False
if not len(os.popen('sox -h').readlines()):
    logger.warning("""SoX could not be found!

    If you do not have SoX, proceed here:
     - - - http://sox.sourceforge.net/ - - -

    If you do (or think that you should) have SoX, double-check your
    path variables.
    """)
    NO_SOX = True

from . import file_info
from .combine import Combiner
from .transform import Transformer
from .core import SoxError
from .core import SoxiError
from .version import version as __version__
<commit_msg>Updating popen call to not hang when initialized in external unit tests<commit_after>#!/usr/bin/env python
""" init method for sox module """
from .log import logger
import os

# Check that SoX is installed and callable
NO_SOX = False
stream_handler = os.popen('sox -h')
if not len(stream_handler.readlines()):
    logger.warning("""SoX could not be found!

    If you do not have SoX, proceed here:
     - - - http://sox.sourceforge.net/ - - -

    If you do (or think that you should) have SoX, double-check your
    path variables.
    """)
    NO_SOX = True
stream_handler.close()

from . import file_info
from .combine import Combiner
from .transform import Transformer
from .core import SoxError
from .core import SoxiError
from .version import version as __version__

{'fraction_non_alphanumeric': 0.09337979094076655, 'fraction_numerical': 0.0, 'mean_word_length': 3.4184615384615387, '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': '179699', 'n_tokens_mistral': 448, 'n_tokens_neox': 437, 'n_words': 176}