~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/selftest/__init__.py

  • Committer: Robert Collins
  • Date: 2005-09-12 12:28:19 UTC
  • mfrom: (1185.3.4)
  • mto: (1092.3.2)
  • mto: This revision was merged to the branch mainline in revision 1397.
  • Revision ID: robertc@robertcollins.net-20050912122819-e3f141d4a14f3f7f
mergeĀ fromĀ HEAD

Show diffs side-by-side

added added

removed removed

Lines of Context:
74
74
        
75
75
        self._log_file_name = name
76
76
 
 
77
    def run(self, result):
 
78
        self.apply_redirected(None, None, None,
 
79
                              unittest.TestCase.run, self, result)
77
80
        
78
81
    def tearDown(self):
79
82
        logging.getLogger('').removeHandler(self._log_hdlr)
138
141
        if stdin is None:
139
142
            stdin = StringIO("")
140
143
        if stdout is None:
141
 
            stdout = self._log_file
 
144
            if hasattr(self, "_log_file"):
 
145
                stdout = self._log_file
 
146
            else:
 
147
                stdout = StringIO()
142
148
        if stderr is None:
143
 
            stderr = self._log_file
 
149
            if hasattr(self, "_log_file"):
 
150
                stderr = self._log_file
 
151
            else:
 
152
                stderr = StringIO()
144
153
        real_stdin = sys.stdin
145
154
        real_stdout = sys.stdout
146
155
        real_stderr = sys.stderr
321
330
                   'bzrlib.selftest.test_merge_core',
322
331
                   'bzrlib.selftest.test_smart_add',
323
332
                   'bzrlib.selftest.testdiff',
 
333
                   'bzrlib.selftest.test_xml',
324
334
                   'bzrlib.fetch',
325
335
                   'bzrlib.selftest.teststore',
 
336
                   'bzrlib.selftest.testgraph',
326
337
                   ]
327
338
 
328
339
    for m in (bzrlib.store, bzrlib.inventory, bzrlib.branch,