forked from loafle/openapi-generator-original
[Python] Updates python test framework to pytest (#4765)
* Switches python generators to use pytest, useNose CLI option added if to allow nose to be used instead * Adds ensure-up-to-date changes * Adds setup.cfg to python clients so we can configure nose when useNose=true * Adds fix for python-aiohttp testing, adds files missing from ensure-up-to-date
This commit is contained in:
committed by
William Cheng
parent
1084cd38a1
commit
3959530465
@@ -45,7 +45,9 @@ coverage.xml
|
||||
*,cover
|
||||
.hypothesis/
|
||||
venv/
|
||||
.venv/
|
||||
.python-version
|
||||
.pytest_cache
|
||||
|
||||
# Translations
|
||||
*.mo
|
||||
|
||||
@@ -0,0 +1,2 @@
|
||||
tox
|
||||
flake8
|
||||
@@ -27,7 +27,7 @@
|
||||
<version>1.2.1</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>nose-test</id>
|
||||
<id>test</id>
|
||||
<phase>integration-test</phase>
|
||||
<goals>
|
||||
<goal>exec</goal>
|
||||
|
||||
@@ -1,4 +1,7 @@
|
||||
connexion >= 2.0.2
|
||||
connexion >= 2.5.0; python_version>="3.6"
|
||||
connexion >= 2.3.0; python_version=="3.5"
|
||||
connexion >= 2.3.0; python_version=="3.4"
|
||||
connexion == 2.4.0; python_version<="2.7"
|
||||
swagger-ui-bundle >= 0.0.2
|
||||
python_dateutil >= 2.6.0
|
||||
setuptools >= 21.0.0
|
||||
|
||||
@@ -1,6 +1,4 @@
|
||||
flask_testing==0.6.1
|
||||
coverage>=4.0.3
|
||||
nose>=1.3.7
|
||||
pluggy>=0.3.1
|
||||
py>=1.4.31
|
||||
randomize>=0.13
|
||||
pytest~=4.6.7 # needed for python 2.7+3.4
|
||||
pytest-cov>=2.8.1
|
||||
pytest-randomly==1.2.3 # needed for python 2.7+3.4
|
||||
flask_testing==0.6.1
|
||||
@@ -1,7 +1,7 @@
|
||||
#!/bin/bash
|
||||
|
||||
REQUIREMENTS_FILE=test-requirements.txt
|
||||
REQUIREMENTS_OUT=test-requirements.txt.log
|
||||
REQUIREMENTS_FILE=dev-requirements.txt
|
||||
REQUIREMENTS_OUT=dev-requirements.txt.log
|
||||
SETUP_OUT=*.egg-info
|
||||
VENV=.venv
|
||||
DEACTIVE=false
|
||||
@@ -18,7 +18,6 @@ fi
|
||||
|
||||
### install dependencies
|
||||
pip install -r $REQUIREMENTS_FILE | tee -a $REQUIREMENTS_OUT
|
||||
python setup.py develop
|
||||
|
||||
### run tests
|
||||
tox || exit 1
|
||||
@@ -27,6 +26,6 @@ tox || exit 1
|
||||
flake8 --show-source petstore_api/
|
||||
|
||||
### deactivate virtualenv
|
||||
#if [ $DEACTIVE == true ]; then
|
||||
# deactivate
|
||||
#fi
|
||||
# if [ $DEACTIVE == true ]; then
|
||||
# deactivate
|
||||
# fi
|
||||
|
||||
@@ -6,5 +6,4 @@ deps=-r{toxinidir}/requirements.txt
|
||||
-r{toxinidir}/test-requirements.txt
|
||||
|
||||
commands=
|
||||
nosetests \
|
||||
[]
|
||||
pytest --cov=openapi_server
|
||||
Reference in New Issue
Block a user