diff --git a/modules/openapi-generator/src/main/resources/python/gitlab-ci.mustache b/modules/openapi-generator/src/main/resources/python/gitlab-ci.mustache index 28046fefa0c..2cabff63c78 100644 --- a/modules/openapi-generator/src/main/resources/python/gitlab-ci.mustache +++ b/modules/openapi-generator/src/main/resources/python/gitlab-ci.mustache @@ -7,8 +7,13 @@ stages: stage: test script: - pip install -r requirements.txt - - pip install nose + - pip install -r test-requirements.txt + {{#useNose}} - nosetests + {{/useNose}} + {{^useNose}} + - pytest --cov={{{packageName}}} + {{/useNose}} nosetest-2.7: extends: .nosetest diff --git a/modules/openapi-generator/src/main/resources/python/travis.mustache b/modules/openapi-generator/src/main/resources/python/travis.mustache index 388de83128f..195488737d6 100644 --- a/modules/openapi-generator/src/main/resources/python/travis.mustache +++ b/modules/openapi-generator/src/main/resources/python/travis.mustache @@ -10,6 +10,13 @@ python: - "3.7" - "3.8" # command to install dependencies -install: "pip install -r requirements.txt" +install: + - "pip install -r requirements.txt" + - "pip install -r test-requirements.txt" # command to run tests +{{#useNose}} script: nosetests +{{/useNose}} +{{^useNose}} +script: pytest --cov={{{packageName}}} +{{/useNose}} diff --git a/samples/client/petstore/python-asyncio/.gitlab-ci.yml b/samples/client/petstore/python-asyncio/.gitlab-ci.yml index 28046fefa0c..142ce3712ed 100644 --- a/samples/client/petstore/python-asyncio/.gitlab-ci.yml +++ b/samples/client/petstore/python-asyncio/.gitlab-ci.yml @@ -7,8 +7,8 @@ stages: stage: test script: - pip install -r requirements.txt - - pip install nose - - nosetests + - pip install -r test-requirements.txt + - pytest --cov=petstore_api nosetest-2.7: extends: .nosetest diff --git a/samples/client/petstore/python-asyncio/.travis.yml b/samples/client/petstore/python-asyncio/.travis.yml index 388de83128f..fcd7e31c7cc 100644 --- a/samples/client/petstore/python-asyncio/.travis.yml +++ b/samples/client/petstore/python-asyncio/.travis.yml @@ -10,6 +10,8 @@ python: - "3.7" - "3.8" # command to install dependencies -install: "pip install -r requirements.txt" +install: + - "pip install -r requirements.txt" + - "pip install -r test-requirements.txt" # command to run tests -script: nosetests +script: pytest --cov=petstore_api diff --git a/samples/client/petstore/python-experimental/.gitlab-ci.yml b/samples/client/petstore/python-experimental/.gitlab-ci.yml index 28046fefa0c..142ce3712ed 100644 --- a/samples/client/petstore/python-experimental/.gitlab-ci.yml +++ b/samples/client/petstore/python-experimental/.gitlab-ci.yml @@ -7,8 +7,8 @@ stages: stage: test script: - pip install -r requirements.txt - - pip install nose - - nosetests + - pip install -r test-requirements.txt + - pytest --cov=petstore_api nosetest-2.7: extends: .nosetest diff --git a/samples/client/petstore/python-experimental/.travis.yml b/samples/client/petstore/python-experimental/.travis.yml index 388de83128f..fcd7e31c7cc 100644 --- a/samples/client/petstore/python-experimental/.travis.yml +++ b/samples/client/petstore/python-experimental/.travis.yml @@ -10,6 +10,8 @@ python: - "3.7" - "3.8" # command to install dependencies -install: "pip install -r requirements.txt" +install: + - "pip install -r requirements.txt" + - "pip install -r test-requirements.txt" # command to run tests -script: nosetests +script: pytest --cov=petstore_api diff --git a/samples/client/petstore/python-tornado/.gitlab-ci.yml b/samples/client/petstore/python-tornado/.gitlab-ci.yml index 28046fefa0c..142ce3712ed 100644 --- a/samples/client/petstore/python-tornado/.gitlab-ci.yml +++ b/samples/client/petstore/python-tornado/.gitlab-ci.yml @@ -7,8 +7,8 @@ stages: stage: test script: - pip install -r requirements.txt - - pip install nose - - nosetests + - pip install -r test-requirements.txt + - pytest --cov=petstore_api nosetest-2.7: extends: .nosetest diff --git a/samples/client/petstore/python-tornado/.travis.yml b/samples/client/petstore/python-tornado/.travis.yml index 388de83128f..fcd7e31c7cc 100644 --- a/samples/client/petstore/python-tornado/.travis.yml +++ b/samples/client/petstore/python-tornado/.travis.yml @@ -10,6 +10,8 @@ python: - "3.7" - "3.8" # command to install dependencies -install: "pip install -r requirements.txt" +install: + - "pip install -r requirements.txt" + - "pip install -r test-requirements.txt" # command to run tests -script: nosetests +script: pytest --cov=petstore_api diff --git a/samples/client/petstore/python/.gitlab-ci.yml b/samples/client/petstore/python/.gitlab-ci.yml index 28046fefa0c..142ce3712ed 100644 --- a/samples/client/petstore/python/.gitlab-ci.yml +++ b/samples/client/petstore/python/.gitlab-ci.yml @@ -7,8 +7,8 @@ stages: stage: test script: - pip install -r requirements.txt - - pip install nose - - nosetests + - pip install -r test-requirements.txt + - pytest --cov=petstore_api nosetest-2.7: extends: .nosetest diff --git a/samples/client/petstore/python/.travis.yml b/samples/client/petstore/python/.travis.yml index 388de83128f..fcd7e31c7cc 100644 --- a/samples/client/petstore/python/.travis.yml +++ b/samples/client/petstore/python/.travis.yml @@ -10,6 +10,8 @@ python: - "3.7" - "3.8" # command to install dependencies -install: "pip install -r requirements.txt" +install: + - "pip install -r requirements.txt" + - "pip install -r test-requirements.txt" # command to run tests -script: nosetests +script: pytest --cov=petstore_api diff --git a/samples/openapi3/client/petstore/python-experimental/.gitlab-ci.yml b/samples/openapi3/client/petstore/python-experimental/.gitlab-ci.yml index 28046fefa0c..142ce3712ed 100644 --- a/samples/openapi3/client/petstore/python-experimental/.gitlab-ci.yml +++ b/samples/openapi3/client/petstore/python-experimental/.gitlab-ci.yml @@ -7,8 +7,8 @@ stages: stage: test script: - pip install -r requirements.txt - - pip install nose - - nosetests + - pip install -r test-requirements.txt + - pytest --cov=petstore_api nosetest-2.7: extends: .nosetest diff --git a/samples/openapi3/client/petstore/python-experimental/.travis.yml b/samples/openapi3/client/petstore/python-experimental/.travis.yml index 388de83128f..fcd7e31c7cc 100644 --- a/samples/openapi3/client/petstore/python-experimental/.travis.yml +++ b/samples/openapi3/client/petstore/python-experimental/.travis.yml @@ -10,6 +10,8 @@ python: - "3.7" - "3.8" # command to install dependencies -install: "pip install -r requirements.txt" +install: + - "pip install -r requirements.txt" + - "pip install -r test-requirements.txt" # command to run tests -script: nosetests +script: pytest --cov=petstore_api diff --git a/samples/openapi3/client/petstore/python/.gitlab-ci.yml b/samples/openapi3/client/petstore/python/.gitlab-ci.yml index 28046fefa0c..142ce3712ed 100644 --- a/samples/openapi3/client/petstore/python/.gitlab-ci.yml +++ b/samples/openapi3/client/petstore/python/.gitlab-ci.yml @@ -7,8 +7,8 @@ stages: stage: test script: - pip install -r requirements.txt - - pip install nose - - nosetests + - pip install -r test-requirements.txt + - pytest --cov=petstore_api nosetest-2.7: extends: .nosetest diff --git a/samples/openapi3/client/petstore/python/.travis.yml b/samples/openapi3/client/petstore/python/.travis.yml index 388de83128f..fcd7e31c7cc 100644 --- a/samples/openapi3/client/petstore/python/.travis.yml +++ b/samples/openapi3/client/petstore/python/.travis.yml @@ -10,6 +10,8 @@ python: - "3.7" - "3.8" # command to install dependencies -install: "pip install -r requirements.txt" +install: + - "pip install -r requirements.txt" + - "pip install -r test-requirements.txt" # command to run tests -script: nosetests +script: pytest --cov=petstore_api