<commit_before>#!/bin/bash
#
# This script assumes that the project 'ptyprocess' is
# available in the parent of the project's folder.
set -e
set -o pipefail

here=$(cd `dirname $0`; pwd)
osrel=$(uname -s)

# run tests
cd $here/..

_cmd=tox
if [ X"$osrel" == X"Darwin" ] || [ X"$osrel" == X"Linux" ]; then
	# python2.6 locks up during py.test on osx build slave,
	# exclude the test environment py26 from osx.
	#
	# https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=754248
	# cannot create a virtualenv for python2.6 due to use of
	# "{}".format in virtualenv, throws exception
	# ValueError: zero length field name in format.
	_cmd='tox -epy27,py33,py34,pypy'
fi

ret=0
echo ${_cmd}
${_cmd} || ret=$?

if [ $ret -ne 0 ]; then
	# we always exit 0, preferring instead the jUnit XML
	# results to be the dominate cause of a failed build.
	echo "py.test returned exit code ${ret}." >&2
	echo "the build should detect and report these failing tests." >&2
fi

# combine all coverage to single file, publish as build<commit_msg>Re-enable python2.6 on osx (maybe notty is the lockup)<commit_after>#!/bin/bash
#
# This script assumes that the project 'ptyprocess' is
# available in the parent of the project's folder.
set -e
set -o pipefail

here=$(cd `dirname $0`; pwd)
osrel=$(uname -s)

# run tests
cd $here/..

_cmd=tox
if [ X"$osrel" == X"Linux" ]; then
	# https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=754248
	# cannot create a virtualenv for python2.6 due to use of
	# "{}".format in virtualenv, throws exception
	# ValueError: zero length field name in format.
	_cmd='tox -epy27,py33,py34,pypy'
fi

ret=0
echo ${_cmd}
${_cmd} || ret=$?

if [ $ret -ne 0 ]; then
	# we always exit 0, preferring instead the jUnit XML
	# results to be the dominate cause of a failed build.
	echo "py.test returned exit code ${ret}." >&2
	echo "the build should detect and report these failing tests." >&2
fi

# combine all coverage to single file, publish as build
{'fraction_non_alphanumeric': 0.1273100616016427, 'fraction_numerical': 0.023613963039014373, 'mean_word_length': 3.9217171717171717, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, 'https://': 2, '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': '1432596', 'n_tokens_mistral': 719, 'n_tokens_neox': 679, 'n_words': 267}