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"/..
25 projectdir="$tmpdir"/p
28 . "$DIR"/../bootstrap.sh TEST_PROJECT --python "$PYTHON"
31 # Test for active virtualenv
32 if [ "$VIRTUAL_ENV" != "$WORKON_HOME/TEST_PROJECT" ]; then
33 echo -e "${error}Expected to be in virtualenv, found python: `which python`${normal}"
35 if [ "`python -V 2>&1`" != "$PYTHON_VER" ]; then
36 echo -e "${error}Expected $PYTHON_VER, found `python -V 2>&1`${normal}"
39 # Test that there is only project dir in the dir.
40 if [ "`ls "$projectdir"`" != "TEST_PROJECT" ]; then
41 echo -e "${error}Only created project expected in project dir, found: `ls "$projectdir"`${normal}"