<commit_before>================
ASKING QUESTIONS
================
In order to test this component, we need to implement ISelectedChoice in a way
that does not require STDIN/OUT processing.  later, we'll over-write the named
utility 'sparc.common.cli_selected_choice' with our implementation.

    >>> from zope.interface import implements
    >>> from sparc.common.interfaces import ISelectedChoice
    >>> class testSelectedChoice(object):
    ...     implements(ISelectedChoice)
    ...     @classmethod
    ...     def selection(cls):
    ...         return '2' # we're A-OK

A named utility is exposed that simplifies the process of retrieving
information from a person executing a command line application.

    >>> import sparc.common
    >>> from sparc.common import Configure
    >>> from sparc.common import ICallable
    >>> from zope.component import getUtility
    >>> Configure([sparc.common])
    
    Now we need to overwrite the 'sparc.common.cli_selected_choice' utility
    with our test implementation.
    
    >>> from zope.component import getGlobalSiteManager
    >>> gsm = getGlobalSiteManager()
    >>> gsm.unregisterUtility(component=sparc.common.cli.cliSelectedChoice, provided=ISelectedChoice, name=u'sparc.common.cli_selected_choice')
    True
    >>> gsm.registerUtility(testSelectedChoice, ISelectedChoice, u'sparc.common.cli_selected_choice')
    
    Now we can test our utility<commit_msg>update import location for Configure(<commit_after>================
ASKING QUESTIONS
================
In order to test this component, we need to implement ISelectedChoice in a way
that does not require STDIN/OUT processing.  later, we'll over-write the named
utility 'sparc.common.cli_selected_choice' with our implementation.

    >>> from zope.interface import implements
    >>> from sparc.common.interfaces import ISelectedChoice
    >>> class testSelectedChoice(object):
    ...     implements(ISelectedChoice)
    ...     @classmethod
    ...     def selection(cls):
    ...         return '2' # we're A-OK

A named utility is exposed that simplifies the process of retrieving
information from a person executing a command line application.

    >>> import sparc.common
    >>> from sparc.configuration.zcml import Configure
    >>> from sparc.common import ICallable
    >>> from zope.component import getUtility
    >>> Configure([sparc.common])
    
    Now we need to overwrite the 'sparc.common.cli_selected_choice' utility
    with our test implementation.
    
    >>> from zope.component import getGlobalSiteManager
    >>> gsm = getGlobalSiteManager()
    >>> gsm.unregisterUtility(component=sparc.common.cli.cliSelectedChoice, provided=ISelectedChoice, name=u'sparc.common.cli_selected_choice')
    True
    >>> gsm.registerUtility(testSelectedChoice, ISelectedChoice, u'sparc.common.cli_selected_choice')
    
    Now we can test our utility
{'fraction_non_alphanumeric': 0.10756419153365718, 'fraction_numerical': 0.0006939625260235947, 'mean_word_length': 3.837248322147651, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 75, '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': '5483763', 'n_tokens_mistral': 773, 'n_tokens_neox': 760, 'n_words': 237}