~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to testsweet.py

  • Committer: aaron.bentley at utoronto
  • Date: 2005-08-18 02:24:28 UTC
  • mto: (1092.1.41) (1185.3.4) (974.1.47)
  • mto: This revision was merged to the branch mainline in revision 1110.
  • Revision ID: aaron.bentley@utoronto.ca-20050818022428-4c0bf84005f4dba8
mergedĀ mbp@sourcefrog.net-20050817233101-0939da1cf91f2472

Show diffs side-by-side

added added

removed removed

Lines of Context:
40
40
 
41
41
from unittest import TestResult, TestCase
42
42
 
 
43
# XXX: Don't need this anymore now we depend on python2.4
43
44
def _need_subprocess():
44
45
    sys.stderr.write("sorry, this test suite requires the subprocess module\n"
45
46
                     "this is shipped with python2.4 and available separately for 2.3\n")
169
170
 
170
171
    def log(self, msg):
171
172
        """Log a message to a progress file"""
 
173
        # XXX: The problem with this is that code that writes straight
 
174
        # to the log file won't be shown when we display the log
 
175
        # buffer; would be better to not have the in-memory buffer and
 
176
        # instead just a log file per test, which is read in and
 
177
        # displayed if the test fails.  That seems to imply one log
 
178
        # per test case, not globally.  OK?
172
179
        self._log_buf = self._log_buf + str(msg) + '\n'
173
180
        print >>self.TEST_LOG, msg
174
181
 
346
353
 
347
354
def _show_test_failure(kind, case, exc_info, out):
348
355
    from traceback import print_exception
349
 
    
 
356
 
 
357
    print >>out
350
358
    print >>out, '-' * 60
351
359
    print >>out, case
352
360