<commit_before>#!/usr/bin/env bash
#
# Runs all unit tests included in PINTS.
#
# To run all tests:
#   $ ./run-test.sh
#
# To run a specific test:
#   $ test/test_logistic_model.py
#
# This file is part of PINTS.
#  Copyright (c) 2017, University of Oxford.
#  For licensing information, see the LICENSE file distributed with the PINTS
#  software package.
#
pints_dir=`pwd`
electrochemistry_dir=${pints_dir}/problems/electrochemistry

export set PYTHONPATH=$PYTHONPATH:${pints_dir}:${electrochemistry_dir}
cd $electrochemistry_dir
ls
mkdir -p build
cd build
cmake -DCMAKE_BUILD_TYPE=$PINTS_BUILD_TYPE ..
make
python -m unittest discover -v ../test
exit_code=$?
cd $pints_dir
exit $exit_code<commit_msg>Made electrochemistry tests python2 specific<commit_after>#!/usr/bin/env bash
#
# Runs all unit tests included in PINTS.
#
# To run all tests:
#   $ ./run-test.sh
#
# To run a specific test:
#   $ test/test_logistic_model.py
#
# This file is part of PINTS.
#  Copyright (c) 2017, University of Oxford.
#  For licensing information, see the LICENSE file distributed with the PINTS
#  software package.
#
pyv="$(python -c 'import sys; print(sys.version_info[0])' 2>&1)"
if [ $pyv -eq 2 ]
then
    pints_dir=`pwd`
    electrochemistry_dir=${pints_dir}/problems/electrochemistry

    export set PYTHONPATH=$PYTHONPATH:${pints_dir}:${electrochemistry_dir}
    cd $electrochemistry_dir
    ls
    mkdir -p build
    cd build
    cmake -DCMAKE_BUILD_TYPE=$PINTS_BUILD_TYPE ..
    make
    python2 -m unittest discover -v ../test
    exit_code=$?
    cd $pints_dir
    exit $exit_code
else
    echo "Electrochemistry tests require Python 2"
fi
{'fraction_non_alphanumeric': 0.10677242220866381, 'fraction_numerical': 0.009151921903599756, 'mean_word_length': 4.046153846153846, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 4, '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': '7032717', 'n_tokens_mistral': 620, 'n_tokens_neox': 565, 'n_words': 166}