<commit_before>#!/bin/bash
#
# Script that will try to test this codebase against as many
# python versions as is possible.  It does this using a combination
# of pythonbrew (for building various interpreters) and tox for
# testing using each of those interpreters.
#

pyversions=(2.6.7
            2.7.7
            3.2.5
            3.3.5
            3.4.1)

# first make sure that pythonbrew is installed
if [ ! -s "$HOME/.pythonbrew/etc/bashrc" ]; then
  curl -kLO http://github.com/utahta/pythonbrew/raw/master/pythonbrew-install
  chmod +x pythonbrew-install
  ./pythonbrew-install
  rm ./pythonbrew-install
fi

# add pythonbrew into our environment
source "$HOME/.pythonbrew/etc/bashrc"

# install each python version that we want to test with
for pyversion in ${pyversions[*]};
do
  if [ ! -s "$HOME/.pythonbrew/bin/py${pyversion}" ]; then
    pythonbrew install ${pyversion}
  fi
done

# Now, run the tests after sourcing venv for tox install/use
pythonbrew venv -p 2.7.7 create python-devicecloud-tox
pythonbrew venv use python-devicecloud-tox
pip install -r test-requirements.txt
tox
<commit_msg>PYTHONDC-8: Fix toxtest.sh script by adding symlinks<commit_after>#!/bin/bash
#
# Script that will try to test this codebase against as many
# python versions as is possible.  It does this using a combination
# of pythonbrew (for building various interpreters) and tox for
# testing using each of those interpreters.
#

pyversions=(2.6.7
            2.7.7
            3.2.5
            3.3.5
            3.4.1)

# first make sure that pythonbrew is installed
if [ ! -s "$HOME/.pythonbrew/etc/bashrc" ]; then
  curl -kLO http://github.com/utahta/pythonbrew/raw/master/pythonbrew-install
  chmod +x pythonbrew-install
  ./pythonbrew-install
  rm ./pythonbrew-install
fi

# add pythonbrew into our environment
source "$HOME/.pythonbrew/etc/bashrc"

# install each python version that we want to test with
for pyversion in ${pyversions[*]};
do
  if [ ! -s "$HOME/.pythonbrew/bin/py${pyversion}" ]; then
    pythonbrew install ${pyversion}
  fi
done

# Now, run the tests after sourcing venv for tox install/use
pythonbrew symlink
pythonbrew venv -p 2.7.7 create python-devicecloud-tox
pythonbrew venv use python-devicecloud-tox
pip install -r test-requirements.txt
tox

{'fraction_non_alphanumeric': 0.09727112676056338, 'fraction_numerical': 0.016285211267605633, 'mean_word_length': 3.2485981308411214, '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': '590695', 'n_tokens_mistral': 733, 'n_tokens_neox': 704, 'n_words': 248}