~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

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

  • Committer: Robert Collins
  • Date: 2007-04-23 02:29:35 UTC
  • mfrom: (2441 +trunk)
  • mto: This revision was merged to the branch mainline in revision 2442.
  • Revision ID: robertc@robertcollins.net-20070423022935-9hhongamvk6bfdso
Resolve conflicts with bzr.dev.

Show diffs side-by-side

added added

removed removed

Lines of Context:
30
30
                          TestCaseInTempDir,
31
31
                          TestCaseWithMemoryTransport,
32
32
                          TestCaseWithTransport,
 
33
                          TestUIFactory,
33
34
                          TestSkipped,
34
35
                          )
35
36
from bzrlib.tests.blackbox import ExternalBase
211
212
        self.assertTrue(self.stdin is self.factory_stdin)
212
213
 
213
214
    def test_ui_factory(self):
214
 
        # each invocation of self.run_bzr_captured should get its own UI
215
 
        # factory, which is an instance of TestUIFactory, with stdout and
216
 
        # stderr attached to the stdout and stderr of the invoked
217
 
        # run_bzr_captured
 
215
        # each invocation of self.run_bzr_captured should get its
 
216
        # own UI factory, which is an instance of TestUIFactory,
 
217
        # with stdin, stdout and stderr attached to the stdin,
 
218
        # stdout and stderr of the invoked run_bzr_captured
218
219
        current_factory = bzrlib.ui.ui_factory
219
220
        self.run_bzr_captured(['foo'])
220
221
        self.failIf(current_factory is self.factory)
222
223
        self.assertNotEqual(sys.stderr, self.factory.stderr)
223
224
        self.assertEqual('foo\n', self.factory.stdout.getvalue())
224
225
        self.assertEqual('bar\n', self.factory.stderr.getvalue())
225
 
        self.assertIsInstance(self.factory, bzrlib.tests.blackbox.TestUIFactory)
 
226
        self.assertIsInstance(self.factory, TestUIFactory)
226
227
 
227
228
    def test_working_dir(self):
228
229
        self.build_tree(['one/', 'two/'])