~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/blackbox/test_diff.py

  • Committer: Vincent Ladeuil
  • Date: 2009-05-05 15:31:34 UTC
  • mto: (4343.1.1 integration)
  • mto: This revision was merged to the branch mainline in revision 4344.
  • Revision ID: v.ladeuil+lp@free.fr-20090505153134-q4bp4is9gywsmzrv
Clean up test for log formats.

* bzrlib/tests/blackbox/test_logformats.py:
Update tests to actual style.

Show diffs side-by-side

added added

removed removed

Lines of Context:
360
360
        # subprocess.py that we had to workaround).
361
361
        # However, if 'diff' may not be available
362
362
        self.make_example_branch()
363
 
        # this will be automatically restored by the base bzr test class
364
 
        os.environ['BZR_PROGRESS_BAR'] = 'none'
365
 
        out, err = self.run_bzr_subprocess('diff -r 1 --diff-options -ub',
366
 
                                           universal_newlines=True,
367
 
                                           retcode=None)
 
363
        orig_progress = os.environ.get('BZR_PROGRESS_BAR')
 
364
        try:
 
365
            os.environ['BZR_PROGRESS_BAR'] = 'none'
 
366
            out, err = self.run_bzr_subprocess('diff -r 1 --diff-options -ub',
 
367
                                               universal_newlines=True,
 
368
                                               retcode=None)
 
369
        finally:
 
370
            if orig_progress is None:
 
371
                del os.environ['BZR_PROGRESS_BAR']
 
372
            else:
 
373
                os.environ['BZR_PROGRESS_BAR'] = orig_progress
 
374
 
368
375
        if 'Diff is not installed on this machine' in err:
369
376
            raise TestSkipped("No external 'diff' is available")
370
377
        self.assertEqual('', err)