From c9a5139befebd47be38f7a8c319cc5b3b5b1b7ec Mon Sep 17 00:00:00 2001 From: Steven Loria Date: Sun, 28 Aug 2016 22:14:40 -0400 Subject: [PATCH] Fix checks for exit codes and update doc for shell command --- {{cookiecutter.app_name}}/README.rst | 2 +- .../{{cookiecutter.app_name}}/commands.py | 5 ++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/{{cookiecutter.app_name}}/README.rst b/{{cookiecutter.app_name}}/README.rst index 895deec..53c205a 100644 --- a/{{cookiecutter.app_name}}/README.rst +++ b/{{cookiecutter.app_name}}/README.rst @@ -49,7 +49,7 @@ To open the interactive shell, run :: flask shell -By default, you will have access to ``app``, ``db``, ``g``, and the ``User`` model. +By default, you will have access to the flask ``app``. Running Tests diff --git a/{{cookiecutter.app_name}}/{{cookiecutter.app_name}}/commands.py b/{{cookiecutter.app_name}}/{{cookiecutter.app_name}}/commands.py index 2b0629d..3e8ca15 100644 --- a/{{cookiecutter.app_name}}/{{cookiecutter.app_name}}/commands.py +++ b/{{cookiecutter.app_name}}/{{cookiecutter.app_name}}/commands.py @@ -19,8 +19,7 @@ def test(): """Run the tests.""" import pytest rv = pytest.main([TEST_PATH, '--verbose']) - if rv is not 0: - exit(rv) + exit(rv) @click.command() @@ -40,7 +39,7 @@ def lint(fix_imports): command_line = list(args) + files_and_directories click.echo('{}: {}'.format(description, ' '.join(command_line))) rv = call(command_line) - if rv is not 0: + if rv != 0: exit(rv) if fix_imports: