Skip to content

Commit

Permalink
[master][noticket][nose plugin][xs]: Change Nose default so that it d…
Browse files Browse the repository at this point in the history
…oes not print docstring when test fails. Otherwise, use --docstrings option.
  • Loading branch information
David Read committed Jan 20, 2012
1 parent 24d5f3b commit ebbdcff
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion ckan/ckan_nose_plugin.py
Expand Up @@ -47,10 +47,21 @@ def options(self, parser, env):
'--ckan-migration',
action='store_true',
dest='ckan_migration',
help='set this when wanting to test migrations')
help='set this when wanting to test migrations')
parser.add_option(
'--docstrings',
action='store_true',
dest='docstrings',
help='set this to display test docstrings instead of module names')

def configure(self, settings, config):
CkanNose.settings = settings
if settings.is_ckan:
self.enabled = True
self.is_first_test = True

def describeTest(self, test):
if not CkanNose.settings.docstrings:
# display module name instead of docstring
return False

0 comments on commit ebbdcff

Please sign in to comment.