<commit_before>#!/bin/sh

TEST=$1

echo "### pyinfra Tests"

if [ -z $TEST ]; then
    echo "--> Testing everything..."
    nosetests --with-coverage --cover-package pyinfra.api,pyinfra.modules,pyinfra.facts
else
    if [ ! -f tests/test_${TEST}.py ]; then
        echo "--> Missing test file tests/test_${TEST}!"
        exit 1
    fi

    echo "--> Testing ${TEST}..."
    nosetests tests.test_${TEST} --with-coverage --cover-package pyinfra.${TEST}
fi<commit_msg>Remove cached coverage before testing.<commit_after>#!/bin/sh

TEST=$1

echo "### pyinfra Tests"

# Remove any cached coverage data
rm -f .coverage

if [ -z $TEST ]; then
    echo "--> Testing everything..."
    nosetests --with-coverage --cover-package pyinfra.api,pyinfra.modules,pyinfra.facts
else
    if [ ! -f tests/test_${TEST}.py ]; then
        echo "--> Missing test file tests/test_${TEST}!"
        exit 1
    fi

    echo "--> Testing ${TEST}..."
    nosetests tests.test_${TEST} --with-coverage --cover-package pyinfra.${TEST}
fi
{'fraction_non_alphanumeric': 0.16865079365079366, 'fraction_numerical': 0.003968253968253968, 'mean_word_length': 2.737037037037037, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 9, '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': '1303878', 'n_tokens_mistral': 352, 'n_tokens_neox': 327, 'n_words': 87}