Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Show the results of acceptance tests with colors
  • Loading branch information
romulomachado committed Mar 9, 2011
1 parent 0cc2508 commit 719bad8
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions terrain.py
Expand Up @@ -75,15 +75,16 @@ def run_time(results):
if result.passed == False:
total_scenarios_failed.update({result.scenario.name: result.scenario.feature})

print '-------------------------------------------------'
print '%i features ran.' % total_features_ran
print '%i scenarios ran.' % total_scenarios_ran
print '%i scenarios passed.' % total_scenarios_passed
print '\n================================================'
print '=========== Acceptance tests results ===========\n'
print '\033[32m\033[1m%i features ran.\033[0;0m' % total_features_ran
print '\033[32m\033[1m%i scenarios ran.\033[0;0m' % total_scenarios_ran
print '\033[32m\033[1m%i scenarios passed.\033[0;0m' % total_scenarios_passed
if total_scenarios_failed:
print 'Error in:'
print '\033[31m\033[1mError in:\033[0;0m'
for scenario, feature in total_scenarios_failed.iteritems():
print feature.name + ' ~> ' + scenario
print '\033[31m\033[1m' + feature.name + ' ~> ' + scenario + '\033[0;0m'
else:
print 'No errors! Congratulations!'
print '\033[32m\033[1mNo errors! Congratulations!\033[0;0m'
print '----------------------------------------------------------------------'
print 'Everything ran in %i minute(s) and %i second(s).' % (minutes, seconds)
print '-------------------------------------------------'

0 comments on commit 719bad8

Please sign in to comment.