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
|
||||
|
||||
@@ -1,4 +1,2 @@
|
||||
tox
|
||||
coverage
|
||||
randomize
|
||||
flake8
|
||||
|
||||
2
samples/client/petstore/python-asyncio/setup.cfg
Normal file
2
samples/client/petstore/python-asyncio/setup.cfg
Normal file
@@ -0,0 +1,2 @@
|
||||
[flake8]
|
||||
max-line-length=99
|
||||
@@ -1,5 +1,3 @@
|
||||
pytest>=3.6.0
|
||||
pytest-cov>=2.6.1
|
||||
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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -6,4 +6,4 @@ deps=-r{toxinidir}/requirements.txt
|
||||
-r{toxinidir}/test-requirements.txt
|
||||
|
||||
commands=
|
||||
pytest -v --cov petstore_api
|
||||
pytest --cov=petstore_api
|
||||
|
||||
Reference in New Issue
Block a user