<commit_before>"""Utility functions for unit test execution"""

def repeat(times):
    """Repeats a single test the given number of times

    Usage:
    @repeat(5)
    def test_foo(self):
        self.assertTrue(self.bar == self.baz)

    The above test will execute 5 times

    Reference:
    """
    def repeatHelper(f):
        def func_repeat_executor(*args, **kwargs):
            for i in range(0, times):
                f(*args, **kwargs)
                args[0].setUp()

        return func_repeat_executor

    return repeatHelper<commit_msg>Add reference SO answer to testutils function<commit_after>"""Utility functions for unit test execution"""

def repeat(times):
    """Repeats a single test the given number of times

    Usage:
    @repeat(5)
    def test_foo(self):
        self.assertTrue(self.bar == self.baz)

    The above test will execute 5 times

    Reference: https://stackoverflow.com/a/13606054/4014685
    """
    def repeatHelper(f):
        def func_repeat_executor(*args, **kwargs):
            for i in range(0, times):
                f(*args, **kwargs)
                args[0].setUp()

        return func_repeat_executor

    return repeatHelper
{'fraction_non_alphanumeric': 0.10379746835443038, 'fraction_numerical': 0.019409282700421943, 'mean_word_length': 2.488235294117647, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 1, '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': '1438525', 'n_tokens_mistral': 359, 'n_tokens_neox': 334, 'n_words': 102}