~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/__init__.py

  • Committer: Blake Winton
  • Date: 2007-10-16 16:02:01 UTC
  • mto: This revision was merged to the branch mainline in revision 2921.
  • Revision ID: bwinton@latte.ca-20071016160201-os2bci2ujf7in7an
Change 'print >> f,'s to 'f.write('s.

Show diffs side-by-side

added added

removed removed

Lines of Context:
354
354
            self.stream.write("%s: " % flavour)
355
355
            self.stream.writeln(self.getDescription(test))
356
356
            if getattr(test, '_get_log', None) is not None:
357
 
                print >>self.stream
358
 
                print >>self.stream, \
359
 
                        ('vvvv[log from %s]' % test.id()).ljust(78,'-')
360
 
                print >>self.stream, test._get_log()
361
 
                print >>self.stream, \
362
 
                        ('^^^^[log from %s]' % test.id()).ljust(78,'-')
 
357
                self.stream.write('\n')
 
358
                self.stream.write(\
 
359
                        ('vvvv[log from %s]' % test.id()).ljust(78,'-'))
 
360
                self.stream.write('\n')
 
361
                self.stream.write(test._get_log())
 
362
                self.stream.write('\n')
 
363
                self.stream.write(\
 
364
                        ('^^^^[log from %s]' % test.id()).ljust(78,'-'))
 
365
                self.stream.write('\n')
363
366
            self.stream.writeln(self.separator2)
364
367
            self.stream.writeln("%s" % err)
365
368
 
1282
1285
                    os.remove(self._log_file_name)
1283
1286
                except OSError, e:
1284
1287
                    if sys.platform == 'win32' and e.errno == errno.EACCES:
1285
 
                        print >>sys.stderr, ('Unable to delete log file '
1286
 
                                             ' %r' % self._log_file_name)
 
1288
                        sys.stderr.write(('Unable to delete log file '
 
1289
                                             ' %r\n' % self._log_file_name))
1287
1290
                    else:
1288
1291
                        raise
1289
1292
            return log_contents
2582
2585
        osutils.rmtree(dirname)
2583
2586
    except OSError, e:
2584
2587
        if sys.platform == 'win32' and e.errno == errno.EACCES:
2585
 
            print >>sys.stderr, ('Permission denied: '
 
2588
            sys.stderr.write(('Permission denied: '
2586
2589
                                 'unable to remove testing dir '
2587
 
                                 '%s' % os.path.basename(dirname))
 
2590
                                 '%\n' % os.path.basename(dirname)))
2588
2591
        else:
2589
2592
            raise
2590
2593