<commit_before>import os
import re
import shutil
from functools import wraps
from unittesting.utils import isiterable
from unittesting import DeferrableTestCase
from unittesting.helpers import TempDirectoryTestCase
from unittesting.helpers import ViewTestCase
import sublime

__dir__ = os.path.dirname(os.path.abspath(__file__))
UUT_dir = os.path.join(
    sublime.packages_path(), 'User', 'UnitTesting')


def set_package(package):
    try:
        shutil.rmtree(os.path.join(sublime.packages_path(), package))
    except Exception:
        pass
    try:
        shutil.copytree(
            os.path.join(__dir__, package),
            os.path.join(sublime.packages_path(), package))
    except Exception:
        pass
    try:
        shutil.rmtree(os.path.join(UUT_dir, package))
    except Exception:
        pass


def cleanup_package(package):
    try:
        shutil.rmtree(os.path.join(sublime.packages_path(), package))
    except Exception:
        pass


def prepare_package(package, output=None, syntax_test=False, syntax_compatibility=False,
                    color_scheme_test=False, delay=None):
    def wrapper(func):<commit_msg>Add random short delay<commit_after>import os
import re
import shutil
from functools import wraps
from unittesting.utils import isiterable
from unittesting import DeferrableTestCase
from unittesting.helpers import TempDirectoryTestCase
from unittesting.helpers import ViewTestCase
import sublime

__dir__ = os.path.dirname(os.path.abspath(__file__))
UUT_dir = os.path.join(
    sublime.packages_path(), 'User', 'UnitTesting')


def set_package(package):
    try:
        shutil.rmtree(os.path.join(sublime.packages_path(), package))
    except Exception:
        pass
    try:
        shutil.copytree(
            os.path.join(__dir__, package),
            os.path.join(sublime.packages_path(), package))
    except Exception:
        pass
    try:
        shutil.rmtree(os.path.join(UUT_dir, package))
    except Exception:
        pass


def cleanup_package(package):
    try:
        shutil.rmtree(os.path.join(sublime.packages_path(), package))
    except Exception:
        pass


def prepare_package(package, output=None, syntax_test=False, syntax_compatibility=False,
                    color_scheme_test=False, delay=100):
    def wrapper(func):
{'fraction_non_alphanumeric': 0.09209383145091225, 'fraction_numerical': 0.0013032145960034753, 'mean_word_length': 3.4288461538461537, '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': '621860', 'n_tokens_mistral': 704, 'n_tokens_neox': 693, 'n_words': 152}