openapi-generator/samples/client/petstore/python/test_python2.sh
2016-07-06 16:34:09 +08:00

31 lines
560 B
Bash
Executable File

#!/bin/bash
REQUIREMENTS_FILE=dev-requirements.txt
REQUIREMENTS_OUT=dev-requirements.txt.log
SETUP_OUT=*.egg-info
VENV=.venv
DEACTIVE=false
export LC_ALL=en_US.UTF-8
export LANG=en_US.UTF-8
### set virtualenv
if [ -z "$VIRTUAL_ENV" ]; then
virtualenv $VENV --no-site-packages --always-copy
source $VENV/bin/activate
DEACTIVE=true
fi
### install dependencies
pip install -r $REQUIREMENTS_FILE | tee -a $REQUIREMENTS_OUT
python setup.py develop
### run tests
nosetests
### deactivate virtualenv
#if [ $DEACTIVE == true ]; then
# deactivate
#fi