<commit_before>#!/bin/bash
testnum=0

test () {
    testnum=$[ $testnum + 1]

    cmd=$1
    expected=$2
    output=$(eval $cmd)
    if [[ $expected != $output ]]
    then
        echo "[ FAIL ] $testnum"
        echo "  output  : $output"
        echo "  expected: $expected"
    else
        echo "[ PASS ] $testnum"
    fi
}
<commit_msg>Test doc printing, update test suite to test python 2 and python 3<commit_after>#!/bin/bash
testnum=0

test () {
    testnum=$[ $testnum + 1]

    cmd=$1
    expected=$2
    output=$(eval $cmd)
    description=${3-""}
    if [[ $expected != $output ]]
    then
        echo "[ FAIL ] $testnum $description"
        echo "  output  : $output"
        echo "  expected: $expected"
    else
        echo "[ PASS ] $testnum $description"
    fi
}

run-tests () {
    defaultpython="python3"
    pythonversion="${1-$defaultpython}"
    py="/bin/$pythonversion"

    testnum=0

    echo "-------------- $pythonversion --------------"

    # Docs
    test "$py modify-color.py | head -1" "modify-color" "docs"
}

run-tests python2
run-tests python3
{'fraction_non_alphanumeric': 0.1711378353376503, 'fraction_numerical': 0.01572617946345976, 'mean_word_length': 2.1545189504373177, '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': '2777846', 'n_tokens_mistral': 369, 'n_tokens_neox': 352, 'n_words': 90}