~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/selftest/__init__.py

  • Committer: Martin Pool
  • Date: 2005-06-22 07:27:35 UTC
  • Revision ID: mbp@sourcefrog.net-20050622072735-73b19bc558f9b479
- show nicer descriptions while running tests

Show diffs side-by-side

added added

removed removed

Lines of Context:
122
122
    No special behaviour for now.
123
123
    """
124
124
    def startTest(self, test):
125
 
        print str(test).ljust(60),
 
125
        # TODO: Maybe show test.shortDescription somewhere?
 
126
        print '%-60.60s' % test.id(),
126
127
        TestResult.startTest(self, test)
127
128
 
128
129
    def stopTest(self, test):
157
158
 
158
159
    _setup_test_log()
159
160
    _setup_test_dir()
 
161
    print
160
162
 
161
163
    suite = TestSuite()
162
164
    tl = TestLoader()
227
229
def _show_test_failure(kind, case, tb):
228
230
     print (kind + '! ').ljust(60, '-')
229
231
     print case
 
232
     desc = test.shortDescription()
 
233
     if desc:
 
234
         print '   (%s)' % desc
230
235
     print tb
231
236
     print ''.ljust(60, '-')
232
237