~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

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

Merge cleanup into description

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