diff --git a/bin/python-server-all.sh b/bin/python-server-all.sh index 5a4f5c754891129a4852947e0d3375bdfe14a33e..5fe3176eed9ec74e73741283741fa1adcdfa5fa1 100755 --- a/bin/python-server-all.sh +++ b/bin/python-server-all.sh @@ -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 diff --git a/docs/generators/python-aiohttp.md b/docs/generators/python-aiohttp.md index 0a9ad07aee85870c0b60ba4f1299149cefcd40ef..1879c95755aa1bc6c956b3d47bf0fb356e9232e7 100644 --- a/docs/generators/python-aiohttp.md +++ b/docs/generators/python-aiohttp.md @@ -15,3 +15,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| diff --git a/docs/generators/python-blueplanet.md b/docs/generators/python-blueplanet.md index ae30ec6f0c66ef376b48ed82549ddf3330f25360..8ad3bc29e4460e330a99a369be1cb1fde99b89e2 100644 --- a/docs/generators/python-blueplanet.md +++ b/docs/generators/python-blueplanet.md @@ -15,3 +15,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| diff --git a/docs/generators/python-experimental.md b/docs/generators/python-experimental.md index 65aaee1985740f953ff4b65fc22a24d150374a65..8ba2d699ed5e0f93355abe0b55b12306570481db 100644 --- a/docs/generators/python-experimental.md +++ b/docs/generators/python-experimental.md @@ -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| diff --git a/docs/generators/python-flask.md b/docs/generators/python-flask.md index f01e68d72136f5e2bd558d2de5481fd1ae45710f..861f6f87a9e6600782a5124243f51ccb80be2736 100644 --- a/docs/generators/python-flask.md +++ b/docs/generators/python-flask.md @@ -15,3 +15,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| diff --git a/docs/generators/python.md b/docs/generators/python.md index 023e92b66716217568490c181bb14d8b5dcf220a..ee581848b0247d026ade9821c7447bfcfd86298b 100644 --- a/docs/generators/python.md +++ b/docs/generators/python.md @@ -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| diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PythonAbstractConnexionServerCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PythonAbstractConnexionServerCodegen.java index 5d6c5ca102ec51a708010748d4aa5462679b3398..5b6e133cac2ac756e8ef07f7acc0b33301b495a0 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PythonAbstractConnexionServerCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PythonAbstractConnexionServerCodegen.java @@ -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); } diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PythonAiohttpConnexionServerCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PythonAiohttpConnexionServerCodegen.java index 0f725396b66046083766d6c40e93759c9a0594bc..eac3c6b0b2e16f85cd6b7ac917e4ef18dbc0398a 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PythonAiohttpConnexionServerCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PythonAiohttpConnexionServerCodegen.java @@ -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")); } } diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PythonClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PythonClientCodegen.java index 4538ee1b5f20f8f4e49f5b761ffe9514d904f2ea..ef410594ec91096be94ccaca7e611f1ba01718cd 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PythonClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PythonClientCodegen.java @@ -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; } diff --git a/modules/openapi-generator/src/main/resources/python-aiohttp/gitignore.mustache b/modules/openapi-generator/src/main/resources/python-aiohttp/gitignore.mustache new file mode 100644 index 0000000000000000000000000000000000000000..43995bd42fa23bbc4c3a59d5fb9da99042fcf139 --- /dev/null +++ b/modules/openapi-generator/src/main/resources/python-aiohttp/gitignore.mustache @@ -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 diff --git a/modules/openapi-generator/src/main/resources/python-aiohttp/test-requirements.mustache b/modules/openapi-generator/src/main/resources/python-aiohttp/test-requirements.mustache index 1cb425f655196c8a52bd3b7089033d14f753acce..16ba4a48111dec9c2b0d4c40fe7a09771a624ffd 100644 --- a/modules/openapi-generator/src/main/resources/python-aiohttp/test-requirements.mustache +++ b/modules/openapi-generator/src/main/resources/python-aiohttp/test-requirements.mustache @@ -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}} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/python-aiohttp/tox.mustache b/modules/openapi-generator/src/main/resources/python-aiohttp/tox.mustache new file mode 100644 index 0000000000000000000000000000000000000000..87cc65eeeb780a69a07409d6ae89ff403a3388d4 --- /dev/null +++ b/modules/openapi-generator/src/main/resources/python-aiohttp/tox.mustache @@ -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}} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/python-blueplanet/app/gitignore.mustache b/modules/openapi-generator/src/main/resources/python-blueplanet/app/gitignore.mustache index a655050c2631466828b5b8bfc59ae27f9ac02dc5..a77a0ebd166066b1783c7039f36ec276f7c4e0f6 100644 --- a/modules/openapi-generator/src/main/resources/python-blueplanet/app/gitignore.mustache +++ b/modules/openapi-generator/src/main/resources/python-blueplanet/app/gitignore.mustache @@ -46,6 +46,7 @@ coverage.xml .hypothesis/ venv/ .python-version +.pytest_cache # Translations *.mo diff --git a/modules/openapi-generator/src/main/resources/python-blueplanet/app/test-requirements.mustache b/modules/openapi-generator/src/main/resources/python-blueplanet/app/test-requirements.mustache index 7f8d96e6b40e853d658f88fa745ddcf37ff7644c..efad5423cb5e9c30eb1b1776460ee9b5abb34867 100644 --- a/modules/openapi-generator/src/main/resources/python-blueplanet/app/test-requirements.mustache +++ b/modules/openapi-generator/src/main/resources/python-blueplanet/app/test-requirements.mustache @@ -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 \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/python-blueplanet/app/tox.mustache b/modules/openapi-generator/src/main/resources/python-blueplanet/app/tox.mustache index 3efa994317d985ca873b43c00bedda8d356905ad..7b3246c36e258d7616eca413e719558f6e3b0297 100644 --- a/modules/openapi-generator/src/main/resources/python-blueplanet/app/tox.mustache +++ b/modules/openapi-generator/src/main/resources/python-blueplanet/app/tox.mustache @@ -6,5 +6,4 @@ deps=-r{toxinidir}/requirements.txt -r{toxinidir}/test-requirements.txt commands= - nosetests \ - [] \ No newline at end of file + {{^useNose}}pytest --cov={{{packageName}}}{{/useNose}}{{#useNose}}nosetests{{/useNose}} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/python-flask/gitignore.mustache b/modules/openapi-generator/src/main/resources/python-flask/gitignore.mustache index a655050c2631466828b5b8bfc59ae27f9ac02dc5..43995bd42fa23bbc4c3a59d5fb9da99042fcf139 100644 --- a/modules/openapi-generator/src/main/resources/python-flask/gitignore.mustache +++ b/modules/openapi-generator/src/main/resources/python-flask/gitignore.mustache @@ -45,7 +45,9 @@ coverage.xml *,cover .hypothesis/ venv/ +.venv/ .python-version +.pytest_cache # Translations *.mo diff --git a/modules/openapi-generator/src/main/resources/python-flask/requirements.mustache b/modules/openapi-generator/src/main/resources/python-flask/requirements.mustache index b5a702d5de8411457569007c83b091ab21bfaf66..921d67d029a2f7cae325a996a7ed441b64694062 100644 --- a/modules/openapi-generator/src/main/resources/python-flask/requirements.mustache +++ b/modules/openapi-generator/src/main/resources/python-flask/requirements.mustache @@ -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}} diff --git a/modules/openapi-generator/src/main/resources/python-flask/test-requirements.mustache b/modules/openapi-generator/src/main/resources/python-flask/test-requirements.mustache index 7f8d96e6b40e853d658f88fa745ddcf37ff7644c..efad5423cb5e9c30eb1b1776460ee9b5abb34867 100644 --- a/modules/openapi-generator/src/main/resources/python-flask/test-requirements.mustache +++ b/modules/openapi-generator/src/main/resources/python-flask/test-requirements.mustache @@ -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 \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/python-flask/tox.mustache b/modules/openapi-generator/src/main/resources/python-flask/tox.mustache index 1195b3391b0b30ecd70332a24afcd1fd97c996c2..7fcd185a8d82934cffc5a6d504feb7b445df8384 100644 --- a/modules/openapi-generator/src/main/resources/python-flask/tox.mustache +++ b/modules/openapi-generator/src/main/resources/python-flask/tox.mustache @@ -6,5 +6,4 @@ deps=-r{toxinidir}/requirements.txt -r{toxinidir}/test-requirements.txt commands= - nosetests \ - [] \ No newline at end of file + {{^useNose}}pytest --cov={{{packageName}}}{{/useNose}}{{#useNose}}nosetests{{/useNose}} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/python/gitignore.mustache b/modules/openapi-generator/src/main/resources/python/gitignore.mustache index a655050c2631466828b5b8bfc59ae27f9ac02dc5..43995bd42fa23bbc4c3a59d5fb9da99042fcf139 100644 --- a/modules/openapi-generator/src/main/resources/python/gitignore.mustache +++ b/modules/openapi-generator/src/main/resources/python/gitignore.mustache @@ -45,7 +45,9 @@ coverage.xml *,cover .hypothesis/ venv/ +.venv/ .python-version +.pytest_cache # Translations *.mo diff --git a/modules/openapi-generator/src/main/resources/python/python-experimental/test-requirements.mustache b/modules/openapi-generator/src/main/resources/python/python-experimental/test-requirements.mustache index 023ff960788ab7e2579ceaf2859c29cd074a915a..338b229bae515053f044ec6ab4b1af7e364d9170 100644 --- a/modules/openapi-generator/src/main/resources/python/python-experimental/test-requirements.mustache +++ b/modules/openapi-generator/src/main/resources/python/python-experimental/test-requirements.mustache @@ -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" \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/python/setup_cfg.mustache b/modules/openapi-generator/src/main/resources/python/setup_cfg.mustache new file mode 100644 index 0000000000000000000000000000000000000000..d89aa72ee4c1279961d05e989183ff430430ec04 --- /dev/null +++ b/modules/openapi-generator/src/main/resources/python/setup_cfg.mustache @@ -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 diff --git a/modules/openapi-generator/src/main/resources/python/test-requirements.mustache b/modules/openapi-generator/src/main/resources/python/test-requirements.mustache index d9e3f20b53694f99d2949e4480319fba79763a45..12021b47a1c20f4e35a69915aec497a9c57c776e 100644 --- a/modules/openapi-generator/src/main/resources/python/test-requirements.mustache +++ b/modules/openapi-generator/src/main/resources/python/test-requirements.mustache @@ -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}} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/python/tox.mustache b/modules/openapi-generator/src/main/resources/python/tox.mustache index 585feb3c681b89faa068851513a564fc0a2f2530..fe989faf9302172f02bde3fef59796aaae65da09 100644 --- a/modules/openapi-generator/src/main/resources/python/tox.mustache +++ b/modules/openapi-generator/src/main/resources/python/tox.mustache @@ -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}} diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/PythonClientOptionsProvider.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/PythonClientOptionsProvider.java index f74b17266ce3ac89e984d3ead2f3f50b93ba10be..d3afcc8f8448619a433ca02c6322b4e786749284 100644 --- a/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/PythonClientOptionsProvider.java +++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/PythonClientOptionsProvider.java @@ -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(); } diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/python/PythonClientOptionsTest.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/python/PythonClientOptionsTest.java index 47d59ba78c4fbbf0f6c41b4d2540dab28e5506e6..ce9d564f4701c2cd3c7131d0b1557673e3cd58a7 100644 --- a/modules/openapi-generator/src/test/java/org/openapitools/codegen/python/PythonClientOptionsTest.java +++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/python/PythonClientOptionsTest.java @@ -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; diff --git a/samples/client/petstore/python-asyncio/.gitignore b/samples/client/petstore/python-asyncio/.gitignore index a655050c2631466828b5b8bfc59ae27f9ac02dc5..43995bd42fa23bbc4c3a59d5fb9da99042fcf139 100644 --- a/samples/client/petstore/python-asyncio/.gitignore +++ b/samples/client/petstore/python-asyncio/.gitignore @@ -45,7 +45,9 @@ coverage.xml *,cover .hypothesis/ venv/ +.venv/ .python-version +.pytest_cache # Translations *.mo diff --git a/samples/client/petstore/python-asyncio/dev-requirements.txt b/samples/client/petstore/python-asyncio/dev-requirements.txt index 49182426e202c97c957b09a3ffb8f37e54605635..ccdfca629494d473aa1a57657fb876bd86a2f986 100644 --- a/samples/client/petstore/python-asyncio/dev-requirements.txt +++ b/samples/client/petstore/python-asyncio/dev-requirements.txt @@ -1,4 +1,2 @@ tox -coverage -randomize flake8 diff --git a/samples/client/petstore/python-asyncio/setup.cfg b/samples/client/petstore/python-asyncio/setup.cfg new file mode 100644 index 0000000000000000000000000000000000000000..11433ee875ab7f4bbc10e8aeb98124c844ce64aa --- /dev/null +++ b/samples/client/petstore/python-asyncio/setup.cfg @@ -0,0 +1,2 @@ +[flake8] +max-line-length=99 diff --git a/samples/client/petstore/python-asyncio/test-requirements.txt b/samples/client/petstore/python-asyncio/test-requirements.txt index 600ac897bb74b2004c9b50310ac53c762381532c..4ed3991cbec106ba84fb2c202ca863d735c55cab 100644 --- a/samples/client/petstore/python-asyncio/test-requirements.txt +++ b/samples/client/petstore/python-asyncio/test-requirements.txt @@ -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 diff --git a/samples/client/petstore/python-asyncio/test_python3.sh b/samples/client/petstore/python-asyncio/test_python3.sh index 9160e25714ad2610ebb33767c0950295ee3b46c0..1a8e712f73c51d6a45ab94187da94a6fb5b2ecb9 100755 --- a/samples/client/petstore/python-asyncio/test_python3.sh +++ b/samples/client/petstore/python-asyncio/test_python3.sh @@ -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 diff --git a/samples/client/petstore/python-asyncio/tox.ini b/samples/client/petstore/python-asyncio/tox.ini index 65f5351ddcc3e101efb77c32dcd0d4f25692be9f..8989fc3c4d96de4ff8aebb8182dbbbe28647b082 100644 --- a/samples/client/petstore/python-asyncio/tox.ini +++ b/samples/client/petstore/python-asyncio/tox.ini @@ -6,4 +6,4 @@ deps=-r{toxinidir}/requirements.txt -r{toxinidir}/test-requirements.txt commands= - pytest -v --cov petstore_api + pytest --cov=petstore_api diff --git a/samples/client/petstore/python-experimental/.gitignore b/samples/client/petstore/python-experimental/.gitignore index a655050c2631466828b5b8bfc59ae27f9ac02dc5..43995bd42fa23bbc4c3a59d5fb9da99042fcf139 100644 --- a/samples/client/petstore/python-experimental/.gitignore +++ b/samples/client/petstore/python-experimental/.gitignore @@ -45,7 +45,9 @@ coverage.xml *,cover .hypothesis/ venv/ +.venv/ .python-version +.pytest_cache # Translations *.mo diff --git a/samples/client/petstore/python-experimental/dev-requirements.txt b/samples/client/petstore/python-experimental/dev-requirements.txt index f50c13b5c50350af8d59f49292007514ca1b74d5..ccdfca629494d473aa1a57657fb876bd86a2f986 100644 --- a/samples/client/petstore/python-experimental/dev-requirements.txt +++ b/samples/client/petstore/python-experimental/dev-requirements.txt @@ -1,5 +1,2 @@ -nose tox -coverage -randomize flake8 diff --git a/samples/client/petstore/python-experimental/pom.xml b/samples/client/petstore/python-experimental/pom.xml index 3c94633318615aa22fd7ad5e58ff74058cf7734f..742451c23b2fcb188c4836c69170a290f1e97d68 100644 --- a/samples/client/petstore/python-experimental/pom.xml +++ b/samples/client/petstore/python-experimental/pom.xml @@ -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> diff --git a/samples/client/petstore/python-experimental/setup.cfg b/samples/client/petstore/python-experimental/setup.cfg index 26b7a359d5807aeaf25991fee23dc9cdcf7a468d..11433ee875ab7f4bbc10e8aeb98124c844ce64aa 100644 --- a/samples/client/petstore/python-experimental/setup.cfg +++ b/samples/client/petstore/python-experimental/setup.cfg @@ -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 diff --git a/samples/client/petstore/python-experimental/test-requirements.txt b/samples/client/petstore/python-experimental/test-requirements.txt index 5816b87495327c17d59403ed35016128172c6b8b..06f7754d20445cd33ffc796c583e067faaed6519 100644 --- a/samples/client/petstore/python-experimental/test-requirements.txt +++ b/samples/client/petstore/python-experimental/test-requirements.txt @@ -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" \ No newline at end of file diff --git a/samples/client/petstore/python-experimental/test_python2.sh b/samples/client/petstore/python-experimental/test_python2.sh index 35de07deec71502543d558b7a4a30f393db84a47..b2f344ec8977aec6e975132bd17c07389c831f96 100644 --- a/samples/client/petstore/python-experimental/test_python2.sh +++ b/samples/client/petstore/python-experimental/test_python2.sh @@ -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/ diff --git a/samples/client/petstore/python-experimental/test_python2_and_3.sh b/samples/client/petstore/python-experimental/test_python2_and_3.sh index 8511d46cd795304c51de7ee496c709bc89b1b6fc..3205dfd07da9de2d697c3900ff483f663e9e691b 100644 --- a/samples/client/petstore/python-experimental/test_python2_and_3.sh +++ b/samples/client/petstore/python-experimental/test_python2_and_3.sh @@ -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 diff --git a/samples/client/petstore/python-experimental/tox.ini b/samples/client/petstore/python-experimental/tox.ini index 3d0be613cfc71c93751e1fe1f6b79586b941b822..169d895329bff81b0dc2f09488dd504c6142d8cf 100644 --- a/samples/client/petstore/python-experimental/tox.ini +++ b/samples/client/petstore/python-experimental/tox.ini @@ -6,5 +6,4 @@ deps=-r{toxinidir}/requirements.txt -r{toxinidir}/test-requirements.txt commands= - nosetests \ - [] + pytest --cov=petstore_api diff --git a/samples/client/petstore/python-tornado/.gitignore b/samples/client/petstore/python-tornado/.gitignore index a655050c2631466828b5b8bfc59ae27f9ac02dc5..43995bd42fa23bbc4c3a59d5fb9da99042fcf139 100644 --- a/samples/client/petstore/python-tornado/.gitignore +++ b/samples/client/petstore/python-tornado/.gitignore @@ -45,7 +45,9 @@ coverage.xml *,cover .hypothesis/ venv/ +.venv/ .python-version +.pytest_cache # Translations *.mo diff --git a/samples/client/petstore/python-tornado/dev-requirements.txt b/samples/client/petstore/python-tornado/dev-requirements.txt index f50c13b5c50350af8d59f49292007514ca1b74d5..ccdfca629494d473aa1a57657fb876bd86a2f986 100644 --- a/samples/client/petstore/python-tornado/dev-requirements.txt +++ b/samples/client/petstore/python-tornado/dev-requirements.txt @@ -1,5 +1,2 @@ -nose tox -coverage -randomize flake8 diff --git a/samples/client/petstore/python-tornado/pom.xml b/samples/client/petstore/python-tornado/pom.xml index 821e12dfe8d3b774f66e884a7cd1fa87e388239d..9aae57304fc7b6ec216f0ba76e216d05ed27f8c0 100644 --- a/samples/client/petstore/python-tornado/pom.xml +++ b/samples/client/petstore/python-tornado/pom.xml @@ -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> diff --git a/samples/client/petstore/python-tornado/setup.cfg b/samples/client/petstore/python-tornado/setup.cfg new file mode 100644 index 0000000000000000000000000000000000000000..11433ee875ab7f4bbc10e8aeb98124c844ce64aa --- /dev/null +++ b/samples/client/petstore/python-tornado/setup.cfg @@ -0,0 +1,2 @@ +[flake8] +max-line-length=99 diff --git a/samples/client/petstore/python-tornado/test-requirements.txt b/samples/client/petstore/python-tornado/test-requirements.txt index 2702246c0e6f92a1c41c0960879e07da339e4b7d..4ed3991cbec106ba84fb2c202ca863d735c55cab 100644 --- a/samples/client/petstore/python-tornado/test-requirements.txt +++ b/samples/client/petstore/python-tornado/test-requirements.txt @@ -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 diff --git a/samples/client/petstore/python-tornado/test_python2_and_3.sh b/samples/client/petstore/python-tornado/test_python2_and_3.sh index 7b5795ec24a9e3bb9cca4660b8d8e392bc1b4b99..3118c449124dec3b0019673c03dc6a12beba02db 100755 --- a/samples/client/petstore/python-tornado/test_python2_and_3.sh +++ b/samples/client/petstore/python-tornado/test_python2_and_3.sh @@ -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 diff --git a/samples/client/petstore/python-tornado/tox.ini b/samples/client/petstore/python-tornado/tox.ini index 3d0be613cfc71c93751e1fe1f6b79586b941b822..169d895329bff81b0dc2f09488dd504c6142d8cf 100644 --- a/samples/client/petstore/python-tornado/tox.ini +++ b/samples/client/petstore/python-tornado/tox.ini @@ -6,5 +6,4 @@ deps=-r{toxinidir}/requirements.txt -r{toxinidir}/test-requirements.txt commands= - nosetests \ - [] + pytest --cov=petstore_api diff --git a/samples/client/petstore/python/.gitignore b/samples/client/petstore/python/.gitignore index a655050c2631466828b5b8bfc59ae27f9ac02dc5..43995bd42fa23bbc4c3a59d5fb9da99042fcf139 100644 --- a/samples/client/petstore/python/.gitignore +++ b/samples/client/petstore/python/.gitignore @@ -45,7 +45,9 @@ coverage.xml *,cover .hypothesis/ venv/ +.venv/ .python-version +.pytest_cache # Translations *.mo diff --git a/samples/client/petstore/python/dev-requirements.txt b/samples/client/petstore/python/dev-requirements.txt index f50c13b5c50350af8d59f49292007514ca1b74d5..ccdfca629494d473aa1a57657fb876bd86a2f986 100644 --- a/samples/client/petstore/python/dev-requirements.txt +++ b/samples/client/petstore/python/dev-requirements.txt @@ -1,5 +1,2 @@ -nose tox -coverage -randomize flake8 diff --git a/samples/client/petstore/python/pom.xml b/samples/client/petstore/python/pom.xml index db2d09246c3b38c761afce14430f6ea72299e789..71814d4388d974dbc027d70adbf465897f072680 100644 --- a/samples/client/petstore/python/pom.xml +++ b/samples/client/petstore/python/pom.xml @@ -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> diff --git a/samples/client/petstore/python/setup.cfg b/samples/client/petstore/python/setup.cfg index 26b7a359d5807aeaf25991fee23dc9cdcf7a468d..11433ee875ab7f4bbc10e8aeb98124c844ce64aa 100644 --- a/samples/client/petstore/python/setup.cfg +++ b/samples/client/petstore/python/setup.cfg @@ -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 diff --git a/samples/client/petstore/python/test-requirements.txt b/samples/client/petstore/python/test-requirements.txt index 2702246c0e6f92a1c41c0960879e07da339e4b7d..4ed3991cbec106ba84fb2c202ca863d735c55cab 100644 --- a/samples/client/petstore/python/test-requirements.txt +++ b/samples/client/petstore/python/test-requirements.txt @@ -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 diff --git a/samples/client/petstore/python/test_python2.sh b/samples/client/petstore/python/test_python2.sh index fb0eaed6ffa0aa78e7ba81cd155c05869c003b8c..4c9488a3329799d2a9f1c4ab44a92c80f6ce8bcf 100755 --- a/samples/client/petstore/python/test_python2.sh +++ b/samples/client/petstore/python/test_python2.sh @@ -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 - diff --git a/samples/client/petstore/python/test_python2_and_3.sh b/samples/client/petstore/python/test_python2_and_3.sh index 7b5795ec24a9e3bb9cca4660b8d8e392bc1b4b99..3118c449124dec3b0019673c03dc6a12beba02db 100755 --- a/samples/client/petstore/python/test_python2_and_3.sh +++ b/samples/client/petstore/python/test_python2_and_3.sh @@ -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 diff --git a/samples/client/petstore/python/tests/test_pet_api.py b/samples/client/petstore/python/tests/test_pet_api.py index 80d34f6b5f21a9d6dbe7efc3931a5ab37184a7bb..b7650f042eb9366ea3fc82ea7e97660eeaeaf28b 100644 --- a/samples/client/petstore/python/tests/test_pet_api.py +++ b/samples/client/petstore/python/tests/test_pet_api.py @@ -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) diff --git a/samples/client/petstore/python/tox.ini b/samples/client/petstore/python/tox.ini index 3d0be613cfc71c93751e1fe1f6b79586b941b822..169d895329bff81b0dc2f09488dd504c6142d8cf 100644 --- a/samples/client/petstore/python/tox.ini +++ b/samples/client/petstore/python/tox.ini @@ -6,5 +6,4 @@ deps=-r{toxinidir}/requirements.txt -r{toxinidir}/test-requirements.txt commands= - nosetests \ - [] + pytest --cov=petstore_api diff --git a/samples/openapi3/client/petstore/python/.gitignore b/samples/openapi3/client/petstore/python/.gitignore index a655050c2631466828b5b8bfc59ae27f9ac02dc5..43995bd42fa23bbc4c3a59d5fb9da99042fcf139 100644 --- a/samples/openapi3/client/petstore/python/.gitignore +++ b/samples/openapi3/client/petstore/python/.gitignore @@ -45,7 +45,9 @@ coverage.xml *,cover .hypothesis/ venv/ +.venv/ .python-version +.pytest_cache # Translations *.mo diff --git a/samples/openapi3/client/petstore/python/dev-requirements.txt b/samples/openapi3/client/petstore/python/dev-requirements.txt new file mode 100644 index 0000000000000000000000000000000000000000..ccdfca629494d473aa1a57657fb876bd86a2f986 --- /dev/null +++ b/samples/openapi3/client/petstore/python/dev-requirements.txt @@ -0,0 +1,2 @@ +tox +flake8 diff --git a/samples/openapi3/client/petstore/python/pom.xml b/samples/openapi3/client/petstore/python/pom.xml index 2fa7d0a113f9aeb485c2bb77cbde8acbb8ec279f..98955483eb8f0a3ca12690516dcdf57ce1a6d970 100644 --- a/samples/openapi3/client/petstore/python/pom.xml +++ b/samples/openapi3/client/petstore/python/pom.xml @@ -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> diff --git a/samples/openapi3/client/petstore/python/setup.cfg b/samples/openapi3/client/petstore/python/setup.cfg new file mode 100644 index 0000000000000000000000000000000000000000..11433ee875ab7f4bbc10e8aeb98124c844ce64aa --- /dev/null +++ b/samples/openapi3/client/petstore/python/setup.cfg @@ -0,0 +1,2 @@ +[flake8] +max-line-length=99 diff --git a/samples/openapi3/client/petstore/python/test-requirements.txt b/samples/openapi3/client/petstore/python/test-requirements.txt index 2702246c0e6f92a1c41c0960879e07da339e4b7d..4ed3991cbec106ba84fb2c202ca863d735c55cab 100644 --- a/samples/openapi3/client/petstore/python/test-requirements.txt +++ b/samples/openapi3/client/petstore/python/test-requirements.txt @@ -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 diff --git a/samples/openapi3/client/petstore/python/test_python2.sh b/samples/openapi3/client/petstore/python/test_python2.sh index fb0eaed6ffa0aa78e7ba81cd155c05869c003b8c..24c3cbdd49603ec9528479442a1d3417abc02883 100644 --- a/samples/openapi3/client/petstore/python/test_python2.sh +++ b/samples/openapi3/client/petstore/python/test_python2.sh @@ -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/ diff --git a/samples/openapi3/client/petstore/python/test_python2_and_3.sh b/samples/openapi3/client/petstore/python/test_python2_and_3.sh index daf08d5bacba5db52ea7878a72f3029b4b857bbc..ab02e6e408098acda125c76162085c17a53c83df 100644 --- a/samples/openapi3/client/petstore/python/test_python2_and_3.sh +++ b/samples/openapi3/client/petstore/python/test_python2_and_3.sh @@ -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 diff --git a/samples/openapi3/client/petstore/python/tox.ini b/samples/openapi3/client/petstore/python/tox.ini index 3d0be613cfc71c93751e1fe1f6b79586b941b822..169d895329bff81b0dc2f09488dd504c6142d8cf 100644 --- a/samples/openapi3/client/petstore/python/tox.ini +++ b/samples/openapi3/client/petstore/python/tox.ini @@ -6,5 +6,4 @@ deps=-r{toxinidir}/requirements.txt -r{toxinidir}/test-requirements.txt commands= - nosetests \ - [] + pytest --cov=petstore_api diff --git a/samples/openapi3/server/petstore/python-flask-python2/.gitignore b/samples/openapi3/server/petstore/python-flask-python2/.gitignore index a655050c2631466828b5b8bfc59ae27f9ac02dc5..43995bd42fa23bbc4c3a59d5fb9da99042fcf139 100644 --- a/samples/openapi3/server/petstore/python-flask-python2/.gitignore +++ b/samples/openapi3/server/petstore/python-flask-python2/.gitignore @@ -45,7 +45,9 @@ coverage.xml *,cover .hypothesis/ venv/ +.venv/ .python-version +.pytest_cache # Translations *.mo diff --git a/samples/openapi3/server/petstore/python-flask-python2/requirements.txt b/samples/openapi3/server/petstore/python-flask-python2/requirements.txt index bc53570662293de6b7130f5902185f3a100d71d1..5c5ce2a1a2694e03f5d130b3513d27d9660c0db6 100644 --- a/samples/openapi3/server/petstore/python-flask-python2/requirements.txt +++ b/samples/openapi3/server/petstore/python-flask-python2/requirements.txt @@ -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 diff --git a/samples/openapi3/server/petstore/python-flask-python2/test-requirements.txt b/samples/openapi3/server/petstore/python-flask-python2/test-requirements.txt index 7f8d96e6b40e853d658f88fa745ddcf37ff7644c..a2626d875ff4e061761df71975c434178591cbee 100644 --- a/samples/openapi3/server/petstore/python-flask-python2/test-requirements.txt +++ b/samples/openapi3/server/petstore/python-flask-python2/test-requirements.txt @@ -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 \ No newline at end of file diff --git a/samples/openapi3/server/petstore/python-flask-python2/tox.ini b/samples/openapi3/server/petstore/python-flask-python2/tox.ini index 26985414c882b56ef2dedccd70b435c10a6f86f9..d05c607610ce2a55b303a6a420aac173844676ff 100644 --- a/samples/openapi3/server/petstore/python-flask-python2/tox.ini +++ b/samples/openapi3/server/petstore/python-flask-python2/tox.ini @@ -6,5 +6,4 @@ deps=-r{toxinidir}/requirements.txt -r{toxinidir}/test-requirements.txt commands= - nosetests \ - [] \ No newline at end of file + pytest --cov=openapi_server \ No newline at end of file diff --git a/samples/openapi3/server/petstore/python-flask/.gitignore b/samples/openapi3/server/petstore/python-flask/.gitignore index a655050c2631466828b5b8bfc59ae27f9ac02dc5..43995bd42fa23bbc4c3a59d5fb9da99042fcf139 100644 --- a/samples/openapi3/server/petstore/python-flask/.gitignore +++ b/samples/openapi3/server/petstore/python-flask/.gitignore @@ -45,7 +45,9 @@ coverage.xml *,cover .hypothesis/ venv/ +.venv/ .python-version +.pytest_cache # Translations *.mo diff --git a/samples/openapi3/server/petstore/python-flask/requirements.txt b/samples/openapi3/server/petstore/python-flask/requirements.txt index 1a01b58049057dc674251300323f4d37b5db9064..029a9dae4cdff52aabf25a2fdb2547eef24bf1bd 100644 --- a/samples/openapi3/server/petstore/python-flask/requirements.txt +++ b/samples/openapi3/server/petstore/python-flask/requirements.txt @@ -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 diff --git a/samples/openapi3/server/petstore/python-flask/test-requirements.txt b/samples/openapi3/server/petstore/python-flask/test-requirements.txt index 7f8d96e6b40e853d658f88fa745ddcf37ff7644c..a2626d875ff4e061761df71975c434178591cbee 100644 --- a/samples/openapi3/server/petstore/python-flask/test-requirements.txt +++ b/samples/openapi3/server/petstore/python-flask/test-requirements.txt @@ -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 \ No newline at end of file diff --git a/samples/openapi3/server/petstore/python-flask/tox.ini b/samples/openapi3/server/petstore/python-flask/tox.ini index ab4dfbb81b8be688239e2d6b667b0c5c08659c6c..cff71191e6cbd5a1706a4fa5823200d58183f059 100644 --- a/samples/openapi3/server/petstore/python-flask/tox.ini +++ b/samples/openapi3/server/petstore/python-flask/tox.ini @@ -6,5 +6,4 @@ deps=-r{toxinidir}/requirements.txt -r{toxinidir}/test-requirements.txt commands= - nosetests \ - [] \ No newline at end of file + pytest --cov=openapi_server \ No newline at end of file diff --git a/samples/server/petstore/python-aiohttp/.gitignore b/samples/server/petstore/python-aiohttp/.gitignore new file mode 100644 index 0000000000000000000000000000000000000000..43995bd42fa23bbc4c3a59d5fb9da99042fcf139 --- /dev/null +++ b/samples/server/petstore/python-aiohttp/.gitignore @@ -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 diff --git a/samples/server/petstore/python-aiohttp/dev-requirements.txt b/samples/server/petstore/python-aiohttp/dev-requirements.txt new file mode 100644 index 0000000000000000000000000000000000000000..ccdfca629494d473aa1a57657fb876bd86a2f986 --- /dev/null +++ b/samples/server/petstore/python-aiohttp/dev-requirements.txt @@ -0,0 +1,2 @@ +tox +flake8 diff --git a/samples/server/petstore/python-aiohttp/pom.xml b/samples/server/petstore/python-aiohttp/pom.xml index 8e77233a458b79d050eef7754fa096676714db3c..26c4b7c492d1c57703caf5c737da4b03b51d2f83 100644 --- a/samples/server/petstore/python-aiohttp/pom.xml +++ b/samples/server/petstore/python-aiohttp/pom.xml @@ -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> diff --git a/samples/server/petstore/python-aiohttp/test-requirements.txt b/samples/server/petstore/python-aiohttp/test-requirements.txt index 1cb425f655196c8a52bd3b7089033d14f753acce..31b28baaf284104fb6d205bb76b84d708154d533 100644 --- a/samples/server/petstore/python-aiohttp/test-requirements.txt +++ b/samples/server/petstore/python-aiohttp/test-requirements.txt @@ -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 diff --git a/samples/server/petstore/python-aiohttp/test_python3.sh b/samples/server/petstore/python-aiohttp/test_python3.sh index c6a92d00aed29325b12a5f73b6b80a746c24fbc5..65d96267d4fbf762d0cc755a0fd7382252e9446d 100755 --- a/samples/server/petstore/python-aiohttp/test_python3.sh +++ b/samples/server/petstore/python-aiohttp/test_python3.sh @@ -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/ diff --git a/samples/server/petstore/python-aiohttp/tox.ini b/samples/server/petstore/python-aiohttp/tox.ini new file mode 100644 index 0000000000000000000000000000000000000000..0f7cd42b8a8b76214fecfd03de02dce4397c5193 --- /dev/null +++ b/samples/server/petstore/python-aiohttp/tox.ini @@ -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 \ No newline at end of file diff --git a/samples/server/petstore/python-blueplanet/.openapi-generator/VERSION b/samples/server/petstore/python-blueplanet/.openapi-generator/VERSION index 0c89fc927e327c0a9913d8300a205efbd30cedbf..58592f031f659c9626c8f9c6dfa7cfe2556e4914 100644 --- a/samples/server/petstore/python-blueplanet/.openapi-generator/VERSION +++ b/samples/server/petstore/python-blueplanet/.openapi-generator/VERSION @@ -1 +1 @@ -4.0.0 \ No newline at end of file +4.2.3-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/python-blueplanet/app/.gitignore b/samples/server/petstore/python-blueplanet/app/.gitignore index a655050c2631466828b5b8bfc59ae27f9ac02dc5..a77a0ebd166066b1783c7039f36ec276f7c4e0f6 100644 --- a/samples/server/petstore/python-blueplanet/app/.gitignore +++ b/samples/server/petstore/python-blueplanet/app/.gitignore @@ -46,6 +46,7 @@ coverage.xml .hypothesis/ venv/ .python-version +.pytest_cache # Translations *.mo diff --git a/samples/server/petstore/python-blueplanet/app/test-requirements.txt b/samples/server/petstore/python-blueplanet/app/test-requirements.txt index 7f8d96e6b40e853d658f88fa745ddcf37ff7644c..a2626d875ff4e061761df71975c434178591cbee 100644 --- a/samples/server/petstore/python-blueplanet/app/test-requirements.txt +++ b/samples/server/petstore/python-blueplanet/app/test-requirements.txt @@ -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 \ No newline at end of file diff --git a/samples/server/petstore/python-blueplanet/app/tox.ini b/samples/server/petstore/python-blueplanet/app/tox.ini index 3e0b644eec48f0d6d63f028c28315ca0eda5896f..d2eb61d57c7e56a4e7d63fffdb33a9babc1be5a8 100644 --- a/samples/server/petstore/python-blueplanet/app/tox.ini +++ b/samples/server/petstore/python-blueplanet/app/tox.ini @@ -6,5 +6,4 @@ deps=-r{toxinidir}/requirements.txt -r{toxinidir}/test-requirements.txt commands= - nosetests \ - [] \ No newline at end of file + pytest --cov=openapi_server \ No newline at end of file diff --git a/samples/server/petstore/python-flask-python2/.gitignore b/samples/server/petstore/python-flask-python2/.gitignore index a655050c2631466828b5b8bfc59ae27f9ac02dc5..43995bd42fa23bbc4c3a59d5fb9da99042fcf139 100644 --- a/samples/server/petstore/python-flask-python2/.gitignore +++ b/samples/server/petstore/python-flask-python2/.gitignore @@ -45,7 +45,9 @@ coverage.xml *,cover .hypothesis/ venv/ +.venv/ .python-version +.pytest_cache # Translations *.mo diff --git a/samples/server/petstore/python-flask-python2/dev-requirements.txt b/samples/server/petstore/python-flask-python2/dev-requirements.txt new file mode 100644 index 0000000000000000000000000000000000000000..ccdfca629494d473aa1a57657fb876bd86a2f986 --- /dev/null +++ b/samples/server/petstore/python-flask-python2/dev-requirements.txt @@ -0,0 +1,2 @@ +tox +flake8 diff --git a/samples/server/petstore/python-flask-python2/pom.xml b/samples/server/petstore/python-flask-python2/pom.xml index 113c387d5f21a95d1fc2b02ce3cc7cc6a688cc97..430bddf2ed3f81d57ebfeed4c1103a9506c54fd5 100644 --- a/samples/server/petstore/python-flask-python2/pom.xml +++ b/samples/server/petstore/python-flask-python2/pom.xml @@ -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> diff --git a/samples/server/petstore/python-flask-python2/requirements.txt b/samples/server/petstore/python-flask-python2/requirements.txt index bc53570662293de6b7130f5902185f3a100d71d1..5c5ce2a1a2694e03f5d130b3513d27d9660c0db6 100644 --- a/samples/server/petstore/python-flask-python2/requirements.txt +++ b/samples/server/petstore/python-flask-python2/requirements.txt @@ -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 diff --git a/samples/server/petstore/python-flask-python2/test-requirements.txt b/samples/server/petstore/python-flask-python2/test-requirements.txt index 7f8d96e6b40e853d658f88fa745ddcf37ff7644c..a2626d875ff4e061761df71975c434178591cbee 100644 --- a/samples/server/petstore/python-flask-python2/test-requirements.txt +++ b/samples/server/petstore/python-flask-python2/test-requirements.txt @@ -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 \ No newline at end of file diff --git a/samples/server/petstore/python-flask-python2/test_python2.sh b/samples/server/petstore/python-flask-python2/test_python2.sh index e579f4d7f559a3d2975f6feb079f7de47887d2f9..89e56c485dee3a63d6e2f0d80f967216aa2c3274 100755 --- a/samples/server/petstore/python-flask-python2/test_python2.sh +++ b/samples/server/petstore/python-flask-python2/test_python2.sh @@ -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 diff --git a/samples/server/petstore/python-flask-python2/tox.ini b/samples/server/petstore/python-flask-python2/tox.ini index 26985414c882b56ef2dedccd70b435c10a6f86f9..d05c607610ce2a55b303a6a420aac173844676ff 100644 --- a/samples/server/petstore/python-flask-python2/tox.ini +++ b/samples/server/petstore/python-flask-python2/tox.ini @@ -6,5 +6,4 @@ deps=-r{toxinidir}/requirements.txt -r{toxinidir}/test-requirements.txt commands= - nosetests \ - [] \ No newline at end of file + pytest --cov=openapi_server \ No newline at end of file diff --git a/samples/server/petstore/python-flask/.gitignore b/samples/server/petstore/python-flask/.gitignore index a655050c2631466828b5b8bfc59ae27f9ac02dc5..43995bd42fa23bbc4c3a59d5fb9da99042fcf139 100644 --- a/samples/server/petstore/python-flask/.gitignore +++ b/samples/server/petstore/python-flask/.gitignore @@ -45,7 +45,9 @@ coverage.xml *,cover .hypothesis/ venv/ +.venv/ .python-version +.pytest_cache # Translations *.mo diff --git a/samples/server/petstore/python-flask/dev-requirements.txt b/samples/server/petstore/python-flask/dev-requirements.txt new file mode 100644 index 0000000000000000000000000000000000000000..ccdfca629494d473aa1a57657fb876bd86a2f986 --- /dev/null +++ b/samples/server/petstore/python-flask/dev-requirements.txt @@ -0,0 +1,2 @@ +tox +flake8 diff --git a/samples/server/petstore/python-flask/pom.xml b/samples/server/petstore/python-flask/pom.xml index 2834d92dbc7a16fe2d4b7aaa785026e088d60d51..542458a0e48f77d7dcf891db9fcc14772eb459d8 100644 --- a/samples/server/petstore/python-flask/pom.xml +++ b/samples/server/petstore/python-flask/pom.xml @@ -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> diff --git a/samples/server/petstore/python-flask/requirements.txt b/samples/server/petstore/python-flask/requirements.txt index 1a01b58049057dc674251300323f4d37b5db9064..029a9dae4cdff52aabf25a2fdb2547eef24bf1bd 100644 --- a/samples/server/petstore/python-flask/requirements.txt +++ b/samples/server/petstore/python-flask/requirements.txt @@ -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 diff --git a/samples/server/petstore/python-flask/test-requirements.txt b/samples/server/petstore/python-flask/test-requirements.txt index 7f8d96e6b40e853d658f88fa745ddcf37ff7644c..a2626d875ff4e061761df71975c434178591cbee 100644 --- a/samples/server/petstore/python-flask/test-requirements.txt +++ b/samples/server/petstore/python-flask/test-requirements.txt @@ -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 \ No newline at end of file diff --git a/samples/server/petstore/python-flask/test_python3.sh b/samples/server/petstore/python-flask/test_python3.sh index 9bd589401cd3eb217a60be264f5eff44389bd273..32fb184fdd83e4faa2c89babac2b3efd79f2409b 100755 --- a/samples/server/petstore/python-flask/test_python3.sh +++ b/samples/server/petstore/python-flask/test_python3.sh @@ -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 diff --git a/samples/server/petstore/python-flask/tox.ini b/samples/server/petstore/python-flask/tox.ini index ab4dfbb81b8be688239e2d6b667b0c5c08659c6c..cff71191e6cbd5a1706a4fa5823200d58183f059 100644 --- a/samples/server/petstore/python-flask/tox.ini +++ b/samples/server/petstore/python-flask/tox.ini @@ -6,5 +6,4 @@ deps=-r{toxinidir}/requirements.txt -r{toxinidir}/test-requirements.txt commands= - nosetests \ - [] \ No newline at end of file + pytest --cov=openapi_server \ No newline at end of file