<commit_before>import os
from os.path import join
from shutil import rmtree, copytree

from invoke import Collection, task
from invocations.docs import docs, www, sites
from invocations.packaging.release import ns as release_coll, publish


@task
def test(ctx, verbose=True, coverage=False, opts=""):
    if verbose:
        opts += " --verbose"
    runner = "pytest"
    if coverage:
        # Leverage how pytest can be run as 'python -m pytest', and then how
        # coverage can be told to run things in that manner instead of
        # expecting a literal .py file.
        # TODO: get pytest's coverage plugin working, IIRC it has issues?
        runner = "coverage run --source=paramiko -m pytest"
    # Strip SSH_AUTH_SOCK from parent env to avoid pollution by interactive
    # users.
    # TODO: once pytest coverage plugin works, see if there's a pytest-native<commit_msg>Tighten up verbose flag<commit_after>import os
from os.path import join
from shutil import rmtree, copytree

from invoke import Collection, task
from invocations.docs import docs, www, sites
from invocations.packaging.release import ns as release_coll, publish


@task
def test(ctx, verbose=True, coverage=False, opts=""):
    if verbose and '--verbose' not in opts and '-v' not in opts:
        opts += " --verbose"
    runner = "pytest"
    if coverage:
        # Leverage how pytest can be run as 'python -m pytest', and then how
        # coverage can be told to run things in that manner instead of
        # expecting a literal .py file.
        # TODO: get pytest's coverage plugin working, IIRC it has issues?
        runner = "coverage run --source=paramiko -m pytest"
    # Strip SSH_AUTH_SOCK from parent env to avoid pollution by interactive
    # users.
    # TODO: once pytest coverage plugin works, see if there's a pytest-native
{'fraction_non_alphanumeric': 0.07381082558775287, 'fraction_numerical': 0.0, 'mean_word_length': 3.1876430205949657, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, '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': '7668766', 'n_tokens_mistral': 522, 'n_tokens_neox': 518, 'n_words': 234}