~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/selftest/__init__.py

  • Committer: Martin Pool
  • Date: 2005-09-01 07:21:18 UTC
  • Revision ID: mbp@sourcefrog.net-20050901072118-f609f9e36f7896d9
- tiny refactoring

Show diffs side-by-side

added added

removed removed

Lines of Context:
143
143
        real_stdin = sys.stdin
144
144
        real_stdout = sys.stdout
145
145
        real_stderr = sys.stderr
146
 
        result = None
147
146
        try:
148
147
            sys.stdout = stdout
149
148
            sys.stderr = stderr
150
149
            sys.stdin = stdin
151
 
            result = a_callable(*args, **kwargs)
 
150
            return a_callable(*args, **kwargs)
152
151
        finally:
153
152
            sys.stdout = real_stdout
154
153
            sys.stderr = real_stderr
155
154
            sys.stdin = real_stdin
156
 
        return result
157
155
 
158
156
 
159
157
BzrTestBase = TestCase