~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/__init__.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2010-05-21 13:36:51 UTC
  • mfrom: (5243.2.1 readdir_cleanup)
  • Revision ID: pqm@pqm.ubuntu.com-20100521133651-p62dndo2giy5ls21
(lifeless) Some cleanups to the readdir pyrex code for a little efficiency
 and to avoid compile warnings. (John A Meinel)

Show diffs side-by-side

added added

removed removed

Lines of Context:
749
749
    # XXX: Should probably unify more with CannedInputUIFactory or a
750
750
    # particular configuration of TextUIFactory, or otherwise have a clearer
751
751
    # idea of how they're supposed to be different.
752
 
    # See https://bugs.edge.launchpad.net/bzr/+bug/408213
 
752
    # See https://bugs.launchpad.net/bzr/+bug/408213
753
753
 
754
754
    def __init__(self, stdout=None, stderr=None, stdin=None):
755
755
        if stdin is not None:
4101
4101
        if test_id != None:
4102
4102
            ui.ui_factory.clear_term()
4103
4103
            sys.stderr.write('\nWhile running: %s\n' % (test_id,))
 
4104
        # Ugly, but the last thing we want here is fail, so bear with it.
 
4105
        printable_e = str(e).decode(osutils.get_user_encoding(), 'replace'
 
4106
                                    ).encode('ascii', 'replace')
4104
4107
        sys.stderr.write('Unable to remove testing dir %s\n%s'
4105
 
                         % (os.path.basename(dirname), e))
 
4108
                         % (os.path.basename(dirname), printable_e))
4106
4109
 
4107
4110
 
4108
4111
class Feature(object):