~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_ui.py

  • Committer: Martin Pool
  • Date: 2010-02-25 06:17:27 UTC
  • mfrom: (5055 +trunk)
  • mto: This revision was merged to the branch mainline in revision 5057.
  • Revision ID: mbp@sourcefrog.net-20100225061727-4sd9lt0qmdc6087t
merge news

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# Copyright (C) 2005, 2008, 2009, 2010 Canonical Ltd
 
1
# Copyright (C) 2005-2010 Canonical Ltd
2
2
#
3
3
# This program is free software; you can redistribute it and/or modify
4
4
# it under the terms of the GNU General Public License as published by
124
124
        finally:
125
125
            pb.finished()
126
126
 
127
 
    def test_progress_nested(self):
128
 
        # test factory based nested and popping.
129
 
        ui = _mod_ui_text.TextUIFactory(None, None, None)
130
 
        pb1 = ui.nested_progress_bar()
131
 
        pb2 = ui.nested_progress_bar()
132
 
        # You do get a warning if the outermost progress bar wasn't finished
133
 
        # first - it's not clear if this is really useful or if it should just
134
 
        # become orphaned -- mbp 20090120
135
 
        warnings, _ = self.callCatchWarnings(pb1.finished)
136
 
        if len(warnings) != 1:
137
 
            self.fail("unexpected warnings: %r" % (warnings,))
138
 
        pb2.finished()
139
 
        pb1.finished()
140
 
 
141
127
    def test_text_ui_get_boolean(self):
142
128
        stdin = tests.StringIOWrapper("y\n" # True
143
129
                                      "n\n" # False