<commit_before>#!/bin/bash

# Copyright 2016 splinter authors. All rights reserved.
# Use of this source code is governed by a BSD-style
# license that can be found in the LICENSE file.

set -ev

if [ "${DRIVER}" = "tests/test_djangoclient.py" ]; then
  pip install -q Django==${DJANGO_VERSION}
fi

if [ "${DRIVER}" = "tests/test_webdriver_remote.py" ]; then
  sleep 1

	wget http://goo.gl/PJUZfa -O selenium-server.jar
	java -jar selenium-server.jar > /dev/null 2>&1 &
	sleep 1
fi

if [ "${DRIVER}" = "tests/test_webdriver_firefox.py" ]; then
    sleep 1

    wget https://github.com/mozilla/geckodriver/releases/download/v0.11.1/geckodriver-v0.11.1-linux64.tar.gz
    mkdir geckodriver
    tar -xzf geckodriver-v0.11.1-linux64.tar.gz -C geckodriver
    mv ./geckodriver $HOME
    chmod +x $HOME/geckodriver/geckodriver

    curl "https://download.mozilla.org/?product=firefox-latest&lang=en-US&os=linux64" -L > firefox.tbz2
    bzip2 -dc firefox.tbz2 | tar xvf -
    mv ./firefox $HOME
    export PATH=$HOME/firefox:$PATH
    ls -lsa $HOME/geckodriver
    ls -lsa $HOME/firefox
    export PATH=$HOME/geckodriver:$PATH
fi

if [ "${DRIVER}" = "tests/test_webdriver_chrome.py" ]; then
    sleep 1

    FILE=`mktemp`; wget "http://chromedriver.storage.googleapis.com/2.20/chromedriver_linux64.zip" -qO $FILE && unzip $FILE chromedriver -d ~; rm $FILE; chmod 777 ~/chromedriver;
    export PATH=$HOME:$PATH
fi<commit_msg>travis: remove zope from deps in python3<commit_after>#!/bin/bash

# Copyright 2016 splinter authors. All rights reserved.
# Use of this source code is governed by a BSD-style
# license that can be found in the LICENSE file.

set -ev

if [ "${DRIVER}" = "tests/test_djangoclient.py" ]; then
  pip install -q Django==${DJANGO_VERSION}
fi

if [ "${DRIVER}" = "tests/test_webdriver_remote.py" ]; then
  sleep 1

	wget http://goo.gl/PJUZfa -O selenium-server.jar
	java -jar selenium-server.jar > /dev/null 2>&1 &
	sleep 1
fi

if [ "${DRIVER}" = "tests/test_webdriver_firefox.py" ]; then
    sleep 1

    wget https://github.com/mozilla/geckodriver/releases/download/v0.11.1/geckodriver-v0.11.1-linux64.tar.gz
    mkdir geckodriver
    tar -xzf geckodriver-v0.11.1-linux64.tar.gz -C geckodriver
    mv ./geckodriver $HOME
    chmod +x $HOME/geckodriver/geckodriver

    curl "https://download.mozilla.org/?product=firefox-latest&lang=en-US&os=linux64" -L > firefox.tbz2
    bzip2 -dc firefox.tbz2 | tar xvf -
    mv ./firefox $HOME
    export PATH=$HOME/firefox:$PATH
    ls -lsa $HOME/geckodriver
    ls -lsa $HOME/firefox
    export PATH=$HOME/geckodriver:$PATH
fi

if [ "${DRIVER}" = "tests/test_webdriver_chrome.py" ]; then
    sleep 1

    FILE=`mktemp`; wget "http://chromedriver.storage.googleapis.com/2.20/chromedriver_linux64.zip" -qO $FILE && unzip $FILE chromedriver -d ~; rm $FILE; chmod 777 ~/chromedriver;
    export PATH=$HOME:$PATH
fi

python_version=$(python -c "import sys; print(sys.version_info.major)")

if [ "${python_version}" = "3" ]; then
  sed -i s/zope.testbrowser==4.0.4//g test-requirements.txt
fi
{'fraction_non_alphanumeric': 0.1418229680816058, 'fraction_numerical': 0.027311615663047056, 'mean_word_length': 3.5508982035928143, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 9, 'https://': 4, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3582658', 'n_tokens_mistral': 1251, 'n_tokens_neox': 1133, 'n_words': 265}