mirror of
https://github.com/valitydev/openapi-generator.git
synced 2024-11-06 10:35:25 +00:00
[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:
parent
1084cd38a1
commit
3959530465
@ -3,3 +3,4 @@
|
||||
./bin/python-server-aiohttp-petstore.sh
|
||||
./bin/python-server-flask-petstore.sh
|
||||
./bin/python-server-flask-petstore-python2.sh
|
||||
./bin/python-server-blueplanet-petstore.sh
|
||||
|
@ -16,3 +16,4 @@ sidebar_label: python-aiohttp
|
||||
|defaultController|default controller| |default_controller|
|
||||
|supportPython2|support python2| |false|
|
||||
|serverPort|TCP port to listen to in app.run| |8080|
|
||||
|useNose|use the nose test framework| |false|
|
||||
|
@ -16,3 +16,4 @@ sidebar_label: python-blueplanet
|
||||
|defaultController|default controller| |default_controller|
|
||||
|supportPython2|support python2| |false|
|
||||
|serverPort|TCP port to listen to in app.run| |8080|
|
||||
|useNose|use the nose test framework| |false|
|
||||
|
@ -12,4 +12,5 @@ sidebar_label: python-experimental
|
||||
|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true|
|
||||
|hideGenerationTimestamp|Hides the generation timestamp when files are generated.| |true|
|
||||
|generateSourceCodeOnly|Specifies that only a library source code is to be generated.| |false|
|
||||
|useNose|use the nose test framework| |false|
|
||||
|library|library template (sub-template) to use: asyncio, tornado, urllib3| |urllib3|
|
||||
|
@ -16,3 +16,4 @@ sidebar_label: python-flask
|
||||
|defaultController|default controller| |default_controller|
|
||||
|supportPython2|support python2| |false|
|
||||
|serverPort|TCP port to listen to in app.run| |8080|
|
||||
|useNose|use the nose test framework| |false|
|
||||
|
@ -12,4 +12,5 @@ sidebar_label: python
|
||||
|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true|
|
||||
|hideGenerationTimestamp|Hides the generation timestamp when files are generated.| |true|
|
||||
|generateSourceCodeOnly|Specifies that only a library source code is to be generated.| |false|
|
||||
|useNose|use the nose test framework| |false|
|
||||
|library|library template (sub-template) to use: asyncio, tornado, urllib3| |urllib3|
|
||||
|
@ -48,6 +48,8 @@ public class PythonAbstractConnexionServerCodegen extends DefaultCodegen impleme
|
||||
public static final String CONTROLLER_PACKAGE = "controllerPackage";
|
||||
public static final String DEFAULT_CONTROLLER = "defaultController";
|
||||
public static final String SUPPORT_PYTHON2 = "supportPython2";
|
||||
// nose is a python testing framework, we use pytest if USE_NOSE is unset
|
||||
public static final String USE_NOSE = "useNose";
|
||||
static final String MEDIA_TYPE = "mediaType";
|
||||
|
||||
protected int serverPort = 8080;
|
||||
@ -57,6 +59,7 @@ public class PythonAbstractConnexionServerCodegen extends DefaultCodegen impleme
|
||||
protected String defaultController;
|
||||
protected Map<Character, String> regexModifiers;
|
||||
protected boolean fixBodyName;
|
||||
protected boolean useNose = Boolean.FALSE;
|
||||
|
||||
public PythonAbstractConnexionServerCodegen(String templateDirectory, boolean fixBodyNameValue) {
|
||||
super();
|
||||
@ -156,6 +159,8 @@ public class PythonAbstractConnexionServerCodegen extends DefaultCodegen impleme
|
||||
defaultValue("false"));
|
||||
cliOptions.add(new CliOption("serverPort", "TCP port to listen to in app.run").
|
||||
defaultValue("8080"));
|
||||
cliOptions.add(CliOption.newBoolean(USE_NOSE, "use the nose test framework").
|
||||
defaultValue(Boolean.FALSE.toString()));
|
||||
}
|
||||
|
||||
protected void addSupportingFiles() {
|
||||
@ -200,6 +205,9 @@ public class PythonAbstractConnexionServerCodegen extends DefaultCodegen impleme
|
||||
additionalProperties.put(SUPPORT_PYTHON2, Boolean.TRUE);
|
||||
typeMapping.put("long", "long");
|
||||
}
|
||||
if (additionalProperties.containsKey(USE_NOSE)) {
|
||||
setUseNose((String) additionalProperties.get(USE_NOSE));
|
||||
}
|
||||
supportingFiles.add(new SupportingFile("__main__.mustache", packagePath(), "__main__.py"));
|
||||
supportingFiles.add(new SupportingFile("util.mustache", packagePath(), "util.py"));
|
||||
supportingFiles.add(new SupportingFile("typing_utils.mustache", packagePath(), "typing_utils.py"));
|
||||
@ -214,6 +222,10 @@ public class PythonAbstractConnexionServerCodegen extends DefaultCodegen impleme
|
||||
controllerPackage = packageName + "." + controllerPackage;
|
||||
}
|
||||
|
||||
public void setUseNose(String val) {
|
||||
this.useNose = Boolean.valueOf(val);
|
||||
}
|
||||
|
||||
private static String packageToPath(String pkg) {
|
||||
return pkg.replace(".", File.separator);
|
||||
}
|
||||
|
@ -44,5 +44,7 @@ public class PythonAiohttpConnexionServerCodegen extends PythonAbstractConnexion
|
||||
supportingFiles.add(new SupportingFile("conftest.mustache", testPackage, "conftest.py"));
|
||||
supportingFiles.add(new SupportingFile("__init__test.mustache", testPackage, "__init__.py"));
|
||||
supportingFiles.add(new SupportingFile("__init__main.mustache", packagePath(), "__init__.py"));
|
||||
supportingFiles.add(new SupportingFile("tox.mustache", "", "tox.ini"));
|
||||
supportingFiles.add(new SupportingFile("gitignore.mustache", "", ".gitignore"));
|
||||
}
|
||||
}
|
||||
|
@ -40,6 +40,8 @@ public class PythonClientCodegen extends DefaultCodegen implements CodegenConfig
|
||||
|
||||
public static final String PACKAGE_URL = "packageUrl";
|
||||
public static final String DEFAULT_LIBRARY = "urllib3";
|
||||
// nose is a python testing framework, we use pytest if USE_NOSE is unset
|
||||
public static final String USE_NOSE = "useNose";
|
||||
|
||||
protected String packageName = "openapi_client";
|
||||
protected String packageVersion = "1.0.0";
|
||||
@ -47,6 +49,7 @@ public class PythonClientCodegen extends DefaultCodegen implements CodegenConfig
|
||||
protected String packageUrl;
|
||||
protected String apiDocPath = "docs/";
|
||||
protected String modelDocPath = "docs/";
|
||||
protected boolean useNose = Boolean.FALSE;
|
||||
|
||||
protected Map<Character, String> regexModifiers;
|
||||
|
||||
@ -127,7 +130,7 @@ public class PythonClientCodegen extends DefaultCodegen implements CodegenConfig
|
||||
"and", "del", "from", "not", "while", "as", "elif", "global", "or", "with",
|
||||
"assert", "else", "if", "pass", "yield", "break", "except", "import",
|
||||
"print", "class", "exec", "in", "raise", "continue", "finally", "is",
|
||||
"return", "def", "for", "lambda", "try", "self", "nonlocal", "None", "True",
|
||||
"return", "def", "for", "lambda", "try", "self", "nonlocal", "None", "True",
|
||||
"False", "async", "await"));
|
||||
|
||||
regexModifiers = new HashMap<Character, String>();
|
||||
@ -151,6 +154,8 @@ public class PythonClientCodegen extends DefaultCodegen implements CodegenConfig
|
||||
.defaultValue(Boolean.TRUE.toString()));
|
||||
cliOptions.add(new CliOption(CodegenConstants.SOURCECODEONLY_GENERATION, CodegenConstants.SOURCECODEONLY_GENERATION_DESC)
|
||||
.defaultValue(Boolean.FALSE.toString()));
|
||||
cliOptions.add(CliOption.newBoolean(USE_NOSE, "use the nose test framework").
|
||||
defaultValue(Boolean.FALSE.toString()));
|
||||
|
||||
supportedLibraries.put("urllib3", "urllib3-based client");
|
||||
supportedLibraries.put("asyncio", "Asyncio-based client (python 3.5+)");
|
||||
@ -190,7 +195,7 @@ public class PythonClientCodegen extends DefaultCodegen implements CodegenConfig
|
||||
|
||||
if (additionalProperties.containsKey(CodegenConstants.PACKAGE_VERSION)) {
|
||||
setPackageVersion((String) additionalProperties.get(CodegenConstants.PACKAGE_VERSION));
|
||||
}
|
||||
}
|
||||
|
||||
Boolean generateSourceCodeOnly = false;
|
||||
if (additionalProperties.containsKey(CodegenConstants.SOURCECODEONLY_GENERATION)) {
|
||||
@ -216,6 +221,10 @@ public class PythonClientCodegen extends DefaultCodegen implements CodegenConfig
|
||||
setPackageUrl((String) additionalProperties.get(PACKAGE_URL));
|
||||
}
|
||||
|
||||
if (additionalProperties.containsKey(USE_NOSE)) {
|
||||
setUseNose((String) additionalProperties.get(USE_NOSE));
|
||||
}
|
||||
|
||||
String readmePath = "README.md";
|
||||
String readmeTemplate = "README.mustache";
|
||||
if (generateSourceCodeOnly) {
|
||||
@ -228,6 +237,7 @@ public class PythonClientCodegen extends DefaultCodegen implements CodegenConfig
|
||||
supportingFiles.add(new SupportingFile("tox.mustache", "", "tox.ini"));
|
||||
supportingFiles.add(new SupportingFile("test-requirements.mustache", "", "test-requirements.txt"));
|
||||
supportingFiles.add(new SupportingFile("requirements.mustache", "", "requirements.txt"));
|
||||
supportingFiles.add(new SupportingFile("setup_cfg.mustache", "", "setup.cfg"));
|
||||
|
||||
supportingFiles.add(new SupportingFile("git_push.sh.mustache", "", "git_push.sh"));
|
||||
supportingFiles.add(new SupportingFile("gitignore.mustache", "", ".gitignore"));
|
||||
@ -579,6 +589,10 @@ public class PythonClientCodegen extends DefaultCodegen implements CodegenConfig
|
||||
this.packageName = packageName;
|
||||
}
|
||||
|
||||
public void setUseNose(String val) {
|
||||
this.useNose = Boolean.valueOf(val);
|
||||
}
|
||||
|
||||
public void setProjectName(String projectName) {
|
||||
this.projectName = projectName;
|
||||
}
|
||||
|
66
modules/openapi-generator/src/main/resources/python-aiohttp/gitignore.mustache
vendored
Normal file
66
modules/openapi-generator/src/main/resources/python-aiohttp/gitignore.mustache
vendored
Normal file
@ -0,0 +1,66 @@
|
||||
# Byte-compiled / optimized / DLL files
|
||||
__pycache__/
|
||||
*.py[cod]
|
||||
*$py.class
|
||||
|
||||
# C extensions
|
||||
*.so
|
||||
|
||||
# Distribution / packaging
|
||||
.Python
|
||||
env/
|
||||
build/
|
||||
develop-eggs/
|
||||
dist/
|
||||
downloads/
|
||||
eggs/
|
||||
.eggs/
|
||||
lib/
|
||||
lib64/
|
||||
parts/
|
||||
sdist/
|
||||
var/
|
||||
*.egg-info/
|
||||
.installed.cfg
|
||||
*.egg
|
||||
|
||||
# PyInstaller
|
||||
# Usually these files are written by a python script from a template
|
||||
# before PyInstaller builds the exe, so as to inject date/other infos into it.
|
||||
*.manifest
|
||||
*.spec
|
||||
|
||||
# Installer logs
|
||||
pip-log.txt
|
||||
pip-delete-this-directory.txt
|
||||
|
||||
# Unit test / coverage reports
|
||||
htmlcov/
|
||||
.tox/
|
||||
.coverage
|
||||
.coverage.*
|
||||
.cache
|
||||
nosetests.xml
|
||||
coverage.xml
|
||||
*,cover
|
||||
.hypothesis/
|
||||
venv/
|
||||
.venv/
|
||||
.python-version
|
||||
.pytest_cache
|
||||
|
||||
# Translations
|
||||
*.mo
|
||||
*.pot
|
||||
|
||||
# Django stuff:
|
||||
*.log
|
||||
|
||||
# Sphinx documentation
|
||||
docs/_build/
|
||||
|
||||
# PyBuilder
|
||||
target/
|
||||
|
||||
#Ipython Notebook
|
||||
.ipynb_checkpoints
|
@ -1,6 +1,13 @@
|
||||
{{#useNose}}
|
||||
coverage>=4.0.3
|
||||
pytest>=1.3.7
|
||||
nose>=1.3.7
|
||||
pluggy>=0.3.1
|
||||
py>=1.4.31
|
||||
randomize>=0.13
|
||||
{{/useNose}}
|
||||
{{^useNose}}
|
||||
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
|
||||
pytest-aiohttp>=0.3.0
|
||||
{{/useNose}}
|
10
modules/openapi-generator/src/main/resources/python-aiohttp/tox.mustache
vendored
Normal file
10
modules/openapi-generator/src/main/resources/python-aiohttp/tox.mustache
vendored
Normal file
@ -0,0 +1,10 @@
|
||||
[tox]
|
||||
envlist = py3
|
||||
skipsdist=True
|
||||
|
||||
[testenv]
|
||||
deps=-r{toxinidir}/requirements.txt
|
||||
-r{toxinidir}/test-requirements.txt
|
||||
|
||||
commands=
|
||||
{{^useNose}}pytest --cov={{{packageName}}}{{/useNose}}{{#useNose}}nosetests{{/useNose}}
|
@ -46,6 +46,7 @@ coverage.xml
|
||||
.hypothesis/
|
||||
venv/
|
||||
.python-version
|
||||
.pytest_cache
|
||||
|
||||
# Translations
|
||||
*.mo
|
||||
|
@ -1,6 +1,13 @@
|
||||
flask_testing==0.6.1
|
||||
{{#useNose}}
|
||||
coverage>=4.0.3
|
||||
nose>=1.3.7
|
||||
pluggy>=0.3.1
|
||||
py>=1.4.31
|
||||
randomize>=0.13
|
||||
{{/useNose}}
|
||||
{{^useNose}}
|
||||
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
|
||||
{{/useNose}}
|
||||
flask_testing==0.6.1
|
@ -6,5 +6,4 @@ deps=-r{toxinidir}/requirements.txt
|
||||
-r{toxinidir}/test-requirements.txt
|
||||
|
||||
commands=
|
||||
nosetests \
|
||||
[]
|
||||
{{^useNose}}pytest --cov={{{packageName}}}{{/useNose}}{{#useNose}}nosetests{{/useNose}}
|
@ -45,7 +45,9 @@ coverage.xml
|
||||
*,cover
|
||||
.hypothesis/
|
||||
venv/
|
||||
.venv/
|
||||
.python-version
|
||||
.pytest_cache
|
||||
|
||||
# Translations
|
||||
*.mo
|
||||
|
@ -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
|
||||
{{#supportPython2}}
|
||||
|
@ -1,6 +1,13 @@
|
||||
flask_testing==0.6.1
|
||||
{{#useNose}}
|
||||
coverage>=4.0.3
|
||||
nose>=1.3.7
|
||||
pluggy>=0.3.1
|
||||
py>=1.4.31
|
||||
randomize>=0.13
|
||||
{{/useNose}}
|
||||
{{^useNose}}
|
||||
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
|
||||
{{/useNose}}
|
||||
flask_testing==0.6.1
|
@ -6,5 +6,4 @@ deps=-r{toxinidir}/requirements.txt
|
||||
-r{toxinidir}/test-requirements.txt
|
||||
|
||||
commands=
|
||||
nosetests \
|
||||
[]
|
||||
{{^useNose}}pytest --cov={{{packageName}}}{{/useNose}}{{#useNose}}nosetests{{/useNose}}
|
@ -45,7 +45,9 @@ coverage.xml
|
||||
*,cover
|
||||
.hypothesis/
|
||||
venv/
|
||||
.venv/
|
||||
.python-version
|
||||
.pytest_cache
|
||||
|
||||
# Translations
|
||||
*.mo
|
||||
|
@ -1,13 +1,13 @@
|
||||
{{^asyncio}}
|
||||
{{#useNose}}
|
||||
coverage>=4.0.3
|
||||
nose>=1.3.7
|
||||
{{/asyncio}}
|
||||
{{#asyncio}}
|
||||
pytest>=3.6.0
|
||||
pytest-cov>=2.6.1
|
||||
{{/asyncio}}
|
||||
pluggy>=0.3.1
|
||||
py>=1.4.31
|
||||
randomize>=0.13
|
||||
mock; python_version<="2.7"
|
||||
|
||||
{{/useNose}}
|
||||
{{^useNose}}
|
||||
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
|
||||
{{/useNose}}
|
||||
mock; python_version<="2.7"
|
13
modules/openapi-generator/src/main/resources/python/setup_cfg.mustache
vendored
Normal file
13
modules/openapi-generator/src/main/resources/python/setup_cfg.mustache
vendored
Normal file
@ -0,0 +1,13 @@
|
||||
{{#useNose}}
|
||||
[nosetests]
|
||||
logging-clear-handlers=true
|
||||
verbosity=2
|
||||
randomize=true
|
||||
exe=true
|
||||
with-coverage=true
|
||||
cover-package=petstore_api
|
||||
cover-erase=true
|
||||
|
||||
{{/useNose}}
|
||||
[flake8]
|
||||
max-line-length=99
|
@ -1,11 +1,12 @@
|
||||
{{^asyncio}}
|
||||
{{#useNose}}
|
||||
coverage>=4.0.3
|
||||
nose>=1.3.7
|
||||
{{/asyncio}}
|
||||
{{#asyncio}}
|
||||
pytest>=3.6.0
|
||||
pytest-cov>=2.6.1
|
||||
{{/asyncio}}
|
||||
pluggy>=0.3.1
|
||||
py>=1.4.31
|
||||
randomize>=0.13
|
||||
{{/useNose}}
|
||||
{{^useNose}}
|
||||
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
|
||||
{{/useNose}}
|
@ -11,10 +11,4 @@ deps=-r{toxinidir}/requirements.txt
|
||||
-r{toxinidir}/test-requirements.txt
|
||||
|
||||
commands=
|
||||
{{^asyncio}}
|
||||
nosetests \
|
||||
[]
|
||||
{{/asyncio}}
|
||||
{{#asyncio}}
|
||||
pytest -v --cov {{{packageName}}}
|
||||
{{/asyncio}}
|
||||
{{^useNose}}pytest --cov={{{packageName}}}{{/useNose}}{{#useNose}}nosetests{{/useNose}}
|
||||
|
@ -28,6 +28,7 @@ public class PythonClientOptionsProvider implements OptionsProvider {
|
||||
public static final String PROJECT_NAME_VALUE = "swagger-client-python";
|
||||
public static final String PACKAGE_VERSION_VALUE = "1.0.0-SNAPSHOT";
|
||||
public static final String PACKAGE_URL_VALUE = "";
|
||||
public static final String USE_NOSE_VALUE = "false";
|
||||
|
||||
@Override
|
||||
public String getLanguage() {
|
||||
@ -45,6 +46,7 @@ public class PythonClientOptionsProvider implements OptionsProvider {
|
||||
.put(CodegenConstants.HIDE_GENERATION_TIMESTAMP, "true")
|
||||
.put(CodegenConstants.SOURCECODEONLY_GENERATION, "false")
|
||||
.put(CodegenConstants.LIBRARY, "urllib3")
|
||||
.put(PythonClientCodegen.USE_NOSE, USE_NOSE_VALUE)
|
||||
.build();
|
||||
}
|
||||
|
||||
|
@ -56,6 +56,9 @@ public class PythonClientOptionsTest extends AbstractOptionsTest {
|
||||
clientCodegen.setPackageUrl(PythonClientOptionsProvider.PACKAGE_URL_VALUE);
|
||||
times = 1;
|
||||
|
||||
clientCodegen.setUseNose(PythonClientOptionsProvider.USE_NOSE_VALUE);
|
||||
times = 1;
|
||||
|
||||
clientCodegen.packagePath();
|
||||
result = PythonClientOptionsProvider.PACKAGE_NAME_VALUE.replace('.', File.separatorChar);
|
||||
minTimes = 1;
|
||||
|
@ -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
|
||||
|
@ -45,7 +45,9 @@ coverage.xml
|
||||
*,cover
|
||||
.hypothesis/
|
||||
venv/
|
||||
.venv/
|
||||
.python-version
|
||||
.pytest_cache
|
||||
|
||||
# Translations
|
||||
*.mo
|
||||
|
@ -1,5 +1,2 @@
|
||||
nose
|
||||
tox
|
||||
coverage
|
||||
randomize
|
||||
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,11 +1,2 @@
|
||||
[nosetests]
|
||||
logging-clear-handlers=true
|
||||
verbosity=2
|
||||
randomize=true
|
||||
exe=true
|
||||
with-coverage=true
|
||||
cover-package=petstore_api
|
||||
cover-erase=true
|
||||
|
||||
[flake8]
|
||||
max-line-length=99
|
||||
|
@ -1,7 +1,4 @@
|
||||
coverage>=4.0.3
|
||||
nose>=1.3.7
|
||||
pluggy>=0.3.1
|
||||
py>=1.4.31
|
||||
randomize>=0.13
|
||||
mock; python_version<="2.7"
|
||||
|
||||
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
|
||||
mock; python_version<="2.7"
|
@ -19,11 +19,9 @@ fi
|
||||
|
||||
### install dependencies
|
||||
pip install -r $REQUIREMENTS_FILE | tee -a $REQUIREMENTS_OUT
|
||||
pip install -r test-requirements.txt
|
||||
python setup.py develop
|
||||
|
||||
### run tests
|
||||
nosetests || exit 1
|
||||
tox -e py27 || exit 1
|
||||
|
||||
### static analysis of code
|
||||
flake8 --show-source petstore_api/
|
||||
|
@ -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,5 +6,4 @@ deps=-r{toxinidir}/requirements.txt
|
||||
-r{toxinidir}/test-requirements.txt
|
||||
|
||||
commands=
|
||||
nosetests \
|
||||
[]
|
||||
pytest --cov=petstore_api
|
||||
|
@ -45,7 +45,9 @@ coverage.xml
|
||||
*,cover
|
||||
.hypothesis/
|
||||
venv/
|
||||
.venv/
|
||||
.python-version
|
||||
.pytest_cache
|
||||
|
||||
# Translations
|
||||
*.mo
|
||||
|
@ -1,5 +1,2 @@
|
||||
nose
|
||||
tox
|
||||
coverage
|
||||
randomize
|
||||
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>
|
||||
|
2
samples/client/petstore/python-tornado/setup.cfg
Normal file
2
samples/client/petstore/python-tornado/setup.cfg
Normal file
@ -0,0 +1,2 @@
|
||||
[flake8]
|
||||
max-line-length=99
|
@ -1,5 +1,3 @@
|
||||
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
|
||||
|
@ -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,5 +6,4 @@ deps=-r{toxinidir}/requirements.txt
|
||||
-r{toxinidir}/test-requirements.txt
|
||||
|
||||
commands=
|
||||
nosetests \
|
||||
[]
|
||||
pytest --cov=petstore_api
|
||||
|
2
samples/client/petstore/python/.gitignore
vendored
2
samples/client/petstore/python/.gitignore
vendored
@ -45,7 +45,9 @@ coverage.xml
|
||||
*,cover
|
||||
.hypothesis/
|
||||
venv/
|
||||
.venv/
|
||||
.python-version
|
||||
.pytest_cache
|
||||
|
||||
# Translations
|
||||
*.mo
|
||||
|
@ -1,5 +1,2 @@
|
||||
nose
|
||||
tox
|
||||
coverage
|
||||
randomize
|
||||
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,11 +1,2 @@
|
||||
[nosetests]
|
||||
logging-clear-handlers=true
|
||||
verbosity=2
|
||||
randomize=true
|
||||
exe=true
|
||||
with-coverage=true
|
||||
cover-package=petstore_api
|
||||
cover-erase=true
|
||||
|
||||
[flake8]
|
||||
max-line-length=99
|
||||
|
@ -1,5 +1,3 @@
|
||||
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
|
||||
|
@ -11,17 +11,16 @@ export LANG=en_US.UTF-8
|
||||
|
||||
### set virtualenv
|
||||
if [ -z "$VIRTUAL_ENV" ]; then
|
||||
virtualenv $VENV --no-site-packages --always-copy
|
||||
virtualenv $VENV --no-site-packages --always-copy --python python
|
||||
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 || exit 1
|
||||
tox -e py27 || exit 1
|
||||
|
||||
### static analysis of code
|
||||
flake8 --show-source petstore_api/
|
||||
@ -30,4 +29,3 @@ flake8 --show-source petstore_api/
|
||||
#if [ $DEACTIVE == true ]; then
|
||||
# deactivate
|
||||
#fi
|
||||
|
||||
|
@ -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
|
||||
|
@ -157,7 +157,7 @@ class PetApiTests(unittest.TestCase):
|
||||
response = thread.get()
|
||||
response2 = thread2.get()
|
||||
|
||||
self.assertEquals(response.id, self.pet.id)
|
||||
self.assertEqual(response.id, self.pet.id)
|
||||
self.assertIsNotNone(response2.id, self.pet.id)
|
||||
|
||||
def test_async_with_http_info(self):
|
||||
@ -167,7 +167,7 @@ class PetApiTests(unittest.TestCase):
|
||||
data, status, headers = thread.get()
|
||||
|
||||
self.assertIsInstance(data, petstore_api.Pet)
|
||||
self.assertEquals(status, 200)
|
||||
self.assertEqual(status, 200)
|
||||
|
||||
def test_async_exception(self):
|
||||
self.pet_api.add_pet(self.pet)
|
||||
|
@ -6,5 +6,4 @@ deps=-r{toxinidir}/requirements.txt
|
||||
-r{toxinidir}/test-requirements.txt
|
||||
|
||||
commands=
|
||||
nosetests \
|
||||
[]
|
||||
pytest --cov=petstore_api
|
||||
|
@ -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>
|
||||
|
2
samples/openapi3/client/petstore/python/setup.cfg
Normal file
2
samples/openapi3/client/petstore/python/setup.cfg
Normal file
@ -0,0 +1,2 @@
|
||||
[flake8]
|
||||
max-line-length=99
|
@ -1,5 +1,3 @@
|
||||
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
|
||||
|
@ -18,10 +18,9 @@ fi
|
||||
|
||||
### install dependencies
|
||||
pip install -r $REQUIREMENTS_FILE | tee -a $REQUIREMENTS_OUT
|
||||
python setup.py develop
|
||||
|
||||
### run tests
|
||||
nosetests || exit 1
|
||||
tox -e py27 || exit 1
|
||||
|
||||
### static analysis of code
|
||||
flake8 --show-source petstore_api/
|
||||
|
@ -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,5 +6,4 @@ deps=-r{toxinidir}/requirements.txt
|
||||
-r{toxinidir}/test-requirements.txt
|
||||
|
||||
commands=
|
||||
nosetests \
|
||||
[]
|
||||
pytest --cov=petstore_api
|
||||
|
@ -45,7 +45,9 @@ coverage.xml
|
||||
*,cover
|
||||
.hypothesis/
|
||||
venv/
|
||||
.venv/
|
||||
.python-version
|
||||
.pytest_cache
|
||||
|
||||
# Translations
|
||||
*.mo
|
||||
|
@ -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
|
||||
typing >= 3.5.2.2
|
||||
|
@ -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
|
@ -6,5 +6,4 @@ deps=-r{toxinidir}/requirements.txt
|
||||
-r{toxinidir}/test-requirements.txt
|
||||
|
||||
commands=
|
||||
nosetests \
|
||||
[]
|
||||
pytest --cov=openapi_server
|
@ -45,7 +45,9 @@ coverage.xml
|
||||
*,cover
|
||||
.hypothesis/
|
||||
venv/
|
||||
.venv/
|
||||
.python-version
|
||||
.pytest_cache
|
||||
|
||||
# Translations
|
||||
*.mo
|
||||
|
@ -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
|
@ -6,5 +6,4 @@ deps=-r{toxinidir}/requirements.txt
|
||||
-r{toxinidir}/test-requirements.txt
|
||||
|
||||
commands=
|
||||
nosetests \
|
||||
[]
|
||||
pytest --cov=openapi_server
|
66
samples/server/petstore/python-aiohttp/.gitignore
vendored
Normal file
66
samples/server/petstore/python-aiohttp/.gitignore
vendored
Normal file
@ -0,0 +1,66 @@
|
||||
# Byte-compiled / optimized / DLL files
|
||||
__pycache__/
|
||||
*.py[cod]
|
||||
*$py.class
|
||||
|
||||
# C extensions
|
||||
*.so
|
||||
|
||||
# Distribution / packaging
|
||||
.Python
|
||||
env/
|
||||
build/
|
||||
develop-eggs/
|
||||
dist/
|
||||
downloads/
|
||||
eggs/
|
||||
.eggs/
|
||||
lib/
|
||||
lib64/
|
||||
parts/
|
||||
sdist/
|
||||
var/
|
||||
*.egg-info/
|
||||
.installed.cfg
|
||||
*.egg
|
||||
|
||||
# PyInstaller
|
||||
# Usually these files are written by a python script from a template
|
||||
# before PyInstaller builds the exe, so as to inject date/other infos into it.
|
||||
*.manifest
|
||||
*.spec
|
||||
|
||||
# Installer logs
|
||||
pip-log.txt
|
||||
pip-delete-this-directory.txt
|
||||
|
||||
# Unit test / coverage reports
|
||||
htmlcov/
|
||||
.tox/
|
||||
.coverage
|
||||
.coverage.*
|
||||
.cache
|
||||
nosetests.xml
|
||||
coverage.xml
|
||||
*,cover
|
||||
.hypothesis/
|
||||
venv/
|
||||
.venv/
|
||||
.python-version
|
||||
.pytest_cache
|
||||
|
||||
# Translations
|
||||
*.mo
|
||||
*.pot
|
||||
|
||||
# Django stuff:
|
||||
*.log
|
||||
|
||||
# Sphinx documentation
|
||||
docs/_build/
|
||||
|
||||
# PyBuilder
|
||||
target/
|
||||
|
||||
#Ipython Notebook
|
||||
.ipynb_checkpoints
|
@ -0,0 +1,2 @@
|
||||
tox
|
||||
flake8
|
@ -27,7 +27,7 @@
|
||||
<version>1.2.1</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>pytest-test</id>
|
||||
<id>test</id>
|
||||
<phase>integration-test</phase>
|
||||
<goals>
|
||||
<goal>exec</goal>
|
||||
|
@ -1,6 +1,4 @@
|
||||
coverage>=4.0.3
|
||||
pytest>=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
|
||||
pytest-aiohttp>=0.3.0
|
||||
|
@ -1,8 +1,7 @@
|
||||
#!/bin/bash
|
||||
|
||||
REQUIREMENTS_FILE=requirements.txt
|
||||
TEST_REQUIREMENTS_FILE=test-requirements.txt
|
||||
REQUIREMENTS_OUT=requirements.txt.log
|
||||
REQUIREMENTS_FILE=dev-requirements.txt
|
||||
REQUIREMENTS_OUT=dev-requirements.txt.log
|
||||
SETUP_OUT=*.egg-info
|
||||
VENV=.venv
|
||||
DEACTIVE=false
|
||||
@ -12,16 +11,16 @@ export LANG=en_US.UTF-8
|
||||
|
||||
### set virtualenv
|
||||
if [ -z "$VIRTUAL_ENV" ]; then
|
||||
virtualenv $VENV --no-site-packages --always-copy --python python3
|
||||
virtualenv $VENV --no-site-packages --always-copy --python python3
|
||||
source $VENV/bin/activate
|
||||
DEACTIVE=true
|
||||
fi
|
||||
|
||||
### install dependencies
|
||||
pip install -r $REQUIREMENTS_FILE -r $TEST_REQUIREMENTS_FILE | tee -a $REQUIREMENTS_OUT
|
||||
pip install -r $REQUIREMENTS_FILE | tee -a $REQUIREMENTS_OUT
|
||||
|
||||
### run tests
|
||||
pytest || exit 1
|
||||
tox || exit 1
|
||||
|
||||
### static analysis of code
|
||||
flake8 --show-source petstore_api/
|
||||
|
10
samples/server/petstore/python-aiohttp/tox.ini
Normal file
10
samples/server/petstore/python-aiohttp/tox.ini
Normal file
@ -0,0 +1,10 @@
|
||||
[tox]
|
||||
envlist = py3
|
||||
skipsdist=True
|
||||
|
||||
[testenv]
|
||||
deps=-r{toxinidir}/requirements.txt
|
||||
-r{toxinidir}/test-requirements.txt
|
||||
|
||||
commands=
|
||||
pytest --cov=openapi_server
|
@ -1 +1 @@
|
||||
4.0.0
|
||||
4.2.3-SNAPSHOT
|
@ -46,6 +46,7 @@ coverage.xml
|
||||
.hypothesis/
|
||||
venv/
|
||||
.python-version
|
||||
.pytest_cache
|
||||
|
||||
# Translations
|
||||
*.mo
|
||||
|
@ -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
|
@ -6,5 +6,4 @@ deps=-r{toxinidir}/requirements.txt
|
||||
-r{toxinidir}/test-requirements.txt
|
||||
|
||||
commands=
|
||||
nosetests \
|
||||
[]
|
||||
pytest --cov=openapi_server
|
@ -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
|
||||
typing >= 3.5.2.2
|
||||
|
@ -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,15 +18,14 @@ fi
|
||||
|
||||
### install dependencies
|
||||
pip install -r $REQUIREMENTS_FILE | tee -a $REQUIREMENTS_OUT
|
||||
python setup.py develop
|
||||
|
||||
### run tests
|
||||
tox || exit 1
|
||||
tox -e py27 || exit 1
|
||||
|
||||
### static analysis of code
|
||||
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
|
@ -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
|
Loading…
Reference in New Issue
Block a user