<commit_before>#!/bin/bash
coverage run ./manage.py test astrobin rawdata
coverage report --omit="/venv/*" &&\
coverage html --omit="/venv/*" -d cover<commit_msg>Make the test script nicer<commit_after>#!/bin/bash

echo "Running tests..."
coverage run ./manage.py test astrobin rawdata --noinput --failfast
if [ ${PIPESTATUS[0]} -eq 0 ]
then
    echo -n "Generating HTML report... "
    coverage html --omit="/venv/*" -d cover >/dev/null 2>&1 && echo "OK"

    echo -n "Total coverage: "
    coverage report --omit="/venv/*" |& grep "TOTAL" | awk '{print $4}'

    echo
    echo "--------------------------------------------"
    echo "See full coverage report at cover/index.html"
    echo "All done. Thanks for testing!"
    echo "--------------------------------------------"
fi
{'fraction_non_alphanumeric': 0.2599231754161332, 'fraction_numerical': 0.006402048655569782, 'mean_word_length': 1.984732824427481, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, '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': '179617', 'n_tokens_mistral': 247, 'n_tokens_neox': 231, 'n_words': 78}