<commit_before>#! /bin/sh
tests="examples/chaining/build.py
examples/conf_example.py
examples/example4.py
examples/example5.py
examples/c/example.py
examples/c/try_example.py
examples/file_hook.py
examples/fortran/conf_fortran.py
examples/fortran/fortran.py
examples/node_example.py
examples/override_ext.py
examples/pyext_example.py
examples/test_env.py"

nerrors=0
ntests=0
nerrors3=0
ntests3=0
old_PYTHONPATH=$PYTHONPATH
PYTHONPATH=$PWD:$PYTHONPATH

PYTHON2=python2

for i in $tests; do
	echo "======== TESTING $i ============="
	f=`basename $i`;
	d=`dirname $i`;
	rm -rf $d/build;
	(cd $d && $PYTHON2 $f);
	if test $? -ne 0; then
		nerrors=`expr $nerrors + 1`;
	fi
	ntests=`expr $ntests + 1`;
done

python3.1 setup.py build
export PYTHONPATH=$PWD/build/py3k
for i in $tests; do
	echo "======== TESTING $i ============="
	f=`basename $i`;
	d=`dirname $i`;
	rm -rf $d/build;
	(cd $d &&  python3.1 $f);
	if test $? -ne 0; then
		nerrors3=`expr $nerrors3 + 1`;
	fi
	ntests3=`expr $ntests3 + 1`;
done

echo "PY2 errors: $nerrors/$ntests | PY3 errors: $nerrors3/$ntests3"
<commit_msg>BUG: fix test script typo.<commit_after>#! /bin/sh
tests="examples/chaining/build.py
examples/conf_example.py
examples/example4.py
examples/example5.py
examples/c/example.py
examples/c/try_example.py
examples/file_hook.py
examples/fortran/conf_fortran.py
examples/fortran/fortran.py
examples/node_example.py
examples/override_ext.py
examples/pyext_example.py
examples/test_env.py"

nerrors=0
ntests=0
nerrors3=0
ntests3=0
old_PYTHONPATH=$PYTHONPATH
PYTHONPATH=$PWD:$PYTHONPATH

PYTHON2=python2.6

for i in $tests; do
	echo "======== TESTING $i ============="
	f=`basename $i`;
	d=`dirname $i`;
	rm -rf $d/build;
	(cd $d && $PYTHON2 $f);
	if test $? -ne 0; then
		nerrors=`expr $nerrors + 1`;
	fi
	ntests=`expr $ntests + 1`;
done

python3.1 setup.py build
export PYTHONPATH=$PWD/build/py3k
for i in $tests; do
	echo "======== TESTING $i ============="
	f=`basename $i`;
	d=`dirname $i`;
	rm -rf $d/build;
	(cd $d &&  python3.1 $f);
	if test $? -ne 0; then
		nerrors3=`expr $nerrors3 + 1`;
	fi
	ntests3=`expr $ntests3 + 1`;
done

echo "PY2 errors: $nerrors/$ntests | PY3 errors: $nerrors3/$ntests3"

{'fraction_non_alphanumeric': 0.18219366681964203, 'fraction_numerical': 0.02799449288664525, 'mean_word_length': 4.8445040214477215, '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': '4896084', 'n_tokens_mistral': 987, 'n_tokens_neox': 926, 'n_words': 200}