Skip to content

Commit

Permalink
ConsoleReporter does not include successful result for tasks that sta…
Browse files Browse the repository at this point in the history
…rts with an _

--HG--
extra : convert_revision : schettino72-20110714125851-907yj2fyt6rtn2hv
  • Loading branch information
schettino72 committed Jul 14, 2011
1 parent 0e77ccf commit 5c8e902
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
3 changes: 2 additions & 1 deletion doit/reporter.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,8 @@ def get_status(self, task):
def execute_task(self, task):
"""called when excution starts"""
# ignore tasks that do not define actions
if task.actions:
# ignore private/hidden tasks (tasks that start with an underscore)
if task.actions and (task.name[0] != '_'):
self.write('. %s\n' % task.title())

def add_failure(self, task, exception):
Expand Down
7 changes: 7 additions & 0 deletions tests/test_reporter.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,13 @@ def do_nothing():pass
rep.execute_task(t1)
assert ". with_action\n" == rep.outstream.getvalue()

def test_executeHidden(self):
rep = reporter.ConsoleReporter(StringIO.StringIO(), {})
def do_nothing():pass
t1 = Task("_hidden",[(do_nothing,)])
rep.execute_task(t1)
assert "" == rep.outstream.getvalue()

def test_executeGroupTask(self):
rep = reporter.ConsoleReporter(StringIO.StringIO(), {})
rep.execute_task(Task("t_name", None))
Expand Down

0 comments on commit 5c8e902

Please sign in to comment.