~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/commands/test_cat.py

  • Committer: Robert Collins
  • Date: 2010-04-08 04:34:03 UTC
  • mfrom: (5138 +trunk)
  • mto: This revision was merged to the branch mainline in revision 5139.
  • Revision ID: robertc@robertcollins.net-20100408043403-56z0d07vdqrx7f3t
Update bugfix for 528114 to trunk.

Show diffs side-by-side

added added

removed removed

Lines of Context:
25
25
 
26
26
    def setUp(self):
27
27
        super(TestCat, self).setUp()
28
 
 
29
 
        def restore_stdout():
30
 
            sys.stdout = self._stdout_orig
31
 
 
32
28
        # Redirect sys.stdout as this is what cat uses
33
29
        self.outf = StringIOWrapper()
34
 
        self._stdout_orig = sys.stdout
35
 
        sys.stdout = self.outf
36
 
        self.addCleanup(restore_stdout)
 
30
        self.overrideAttr(sys, 'stdout', self.outf)
37
31
 
38
32
    def test_cat(self):
39
33
        # FIXME: sftp raises ReadError instead of NoSuchFile when probing for