<commit_before>#!/bin/bash

set -e
errors=0

cd python

(
   cd biotool
   # Run unit tests
   python -m unittest -v biotool || {
       echo "'python -m unittest -v biotool' failed"
       let errors+=1
   }
)

# Check program style
pylint -E biotool || {
    echo "'pylint -E biotool' failed"
    let errors+=1
}

[ "$errors" -gt 0 ] && {
    echo "There were $errors errors found"
    exit 1
}

echo "Ok : Python specific tests"<commit_msg>Directory wrangling in python test script for travis<commit_after>#!/bin/bash

set -e
errors=0

TOP_DIR=`pwd`
cd python

# Run unit tests
cd biotool
python -m unittest -v biotool || {
    echo "'python -m unittest -v biotool' failed"
    let errors+=1
}

cd $TOP_DIR
# Check program style
pylint -E biotool || {
    echo "'pylint -E biotool' failed"
    let errors+=1
}

[ "$errors" -gt 0 ] && {
    echo "There were $errors errors found"
    exit 1
}

echo "Ok : Python specific tests"
{'fraction_non_alphanumeric': 0.12055974165769645, 'fraction_numerical': 0.010764262648008612, 'mean_word_length': 2.795918367346939, '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': '2604350', 'n_tokens_mistral': 346, 'n_tokens_neox': 339, 'n_words': 117}