forked from loafle/openapi-generator-original
update python to use test spec
This commit is contained in:
27
samples/client/petstore/python/test_python2.sh
Executable file
27
samples/client/petstore/python/test_python2.sh
Executable file
@@ -0,0 +1,27 @@
|
||||
#!/bin/bash
|
||||
|
||||
REQUIREMENTS_FILE=dev-requirements.txt
|
||||
REQUIREMENTS_OUT=dev-requirements.txt.log
|
||||
SETUP_OUT=*.egg-info
|
||||
VENV=.venv
|
||||
DEACTIVE=false
|
||||
|
||||
### 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
|
||||
|
||||
Reference in New Issue
Block a user