2 DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
8 tmpdir="`mktemp -d "$DIR/test-XXX"`"
12 export WORKON_HOME="$tmpdir/v"
17 if [ -z "$PYTHON" ]; then
20 PYTHON_VER="`$PYTHON -V 2>&1`"
21 echo -e "${strong}Using $PYTHON_VER${normal}"
22 PYTHON="`which $PYTHON`"
24 FNP_PROJECT_TEMPLATE="$DIR"/../src
25 projectdir="$tmpdir"/p
31 . "$DIR"/../bootstrap.sh
34 # Test for active virtualenv
35 if [ "$VIRTUAL_ENV" != "$WORKON_HOME/TEST_PROJECT" ]; then
36 echo -e "${error}Expected to be in virtualenv, found python: `which python`${normal}"
38 if [ "`python -V 2>&1`" != "$PYTHON_VER" ]; then
39 echo -e "${error}Expected $PYTHON_VER, found `python -V 2>&1`${normal}"
42 # Test that there is only project dir in the dir.
43 if [ "`ls "$projectdir"`" != "TEST_PROJECT" ]; then
44 echo -e "${error}Only created project expected in project dir, found: `ls "$projectdir"`${normal}"