From a77ae51318d18c8affa657b421606042cd311154 Mon Sep 17 00:00:00 2001 From: geekerzp Date: Tue, 19 May 2015 15:21:09 +0800 Subject: [PATCH] update python tests --- .../src/main/resources/python/README.mustache | 5 +++-- .../client/petstore/python/SwaggerPetstore-python/Makefile | 4 ++-- .../client/petstore/python/SwaggerPetstore-python/README.md | 5 +++-- .../client/petstore/python/SwaggerPetstore-python/setup.cfg | 1 + 4 files changed, 9 insertions(+), 6 deletions(-) diff --git a/modules/swagger-codegen/src/main/resources/python/README.mustache b/modules/swagger-codegen/src/main/resources/python/README.mustache index a3e4325cc8..9c590a9a50 100644 --- a/modules/swagger-codegen/src/main/resources/python/README.mustache +++ b/modules/swagger-codegen/src/main/resources/python/README.mustache @@ -38,6 +38,8 @@ TODO ## Tests +(Make sure you are running it inside of a [virtualenv](http://docs.python-guide.org/en/latest/dev/virtualenvs/)) + You can run the tests in the current python platform: ```sh @@ -60,8 +62,7 @@ Using 2195432783 as seed [INFO] Final Memory: 11M/156M [INFO] ------------------------------------------------------------------------ ``` -If you want to run the tests in all the python platforms, -make sure you are running it inside of a [virtualenv](http://docs.python-guide.org/en/latest/dev/virtualenvs/): +If you want to run the tests in all the python platforms: ```sh $ make test-all diff --git a/samples/client/petstore/python/SwaggerPetstore-python/Makefile b/samples/client/petstore/python/SwaggerPetstore-python/Makefile index e829f17159..2811b735b5 100644 --- a/samples/client/petstore/python/SwaggerPetstore-python/Makefile +++ b/samples/client/petstore/python/SwaggerPetstore-python/Makefile @@ -8,7 +8,7 @@ ifndef VIRTUAL_ENV http://docs.python-guide.org/en/latest/dev/virtualenvs/) endif -setup: $(SETUP_OUT) +setup: virtualenv $(SETUP_OUT) $(SETUP_OUT): setup.py setup.cfg python setup.py develop @@ -31,7 +31,7 @@ requirements: setup $(REQUIREMENTS_OUT) test: clean requirements nosetests -test-all: virtualenv clean requirements +test-all: clean requirements tox diff --git a/samples/client/petstore/python/SwaggerPetstore-python/README.md b/samples/client/petstore/python/SwaggerPetstore-python/README.md index a3e4325cc8..9c590a9a50 100644 --- a/samples/client/petstore/python/SwaggerPetstore-python/README.md +++ b/samples/client/petstore/python/SwaggerPetstore-python/README.md @@ -38,6 +38,8 @@ TODO ## Tests +(Make sure you are running it inside of a [virtualenv](http://docs.python-guide.org/en/latest/dev/virtualenvs/)) + You can run the tests in the current python platform: ```sh @@ -60,8 +62,7 @@ Using 2195432783 as seed [INFO] Final Memory: 11M/156M [INFO] ------------------------------------------------------------------------ ``` -If you want to run the tests in all the python platforms, -make sure you are running it inside of a [virtualenv](http://docs.python-guide.org/en/latest/dev/virtualenvs/): +If you want to run the tests in all the python platforms: ```sh $ make test-all diff --git a/samples/client/petstore/python/SwaggerPetstore-python/setup.cfg b/samples/client/petstore/python/SwaggerPetstore-python/setup.cfg index f1ef0cc4d0..e62af08003 100644 --- a/samples/client/petstore/python/SwaggerPetstore-python/setup.cfg +++ b/samples/client/petstore/python/SwaggerPetstore-python/setup.cfg @@ -2,6 +2,7 @@ logging-clear-handlers=true verbosity=2 randomize=true +exe=true with-coverage=true cover-package=SwaggerPetstore cover-erase=true