#!/bin/bash
#
# Copyright 2014-2018 Facundo Batista, Nicolás Demarchi

set -eu

if [ $# -ne 0 ]; then
    TARGET_TESTS="$@"
else
    TARGET_TESTS=""
fi

./bin/fades -r requirements.txt -d pytest-cov -x pytest --cov=fades $TARGET_TESTS

# check if we are using exit() in the code.
if grep -r -n ' exit(' --include="*.py" .; then echo 'Please use sys.exit() instead of exit(). https://github.com/PyAr/fades/issues/280'; fi
