~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_ui.py

  • Committer: John Arbash Meinel
  • Date: 2010-02-10 17:52:08 UTC
  • mfrom: (5021 +trunk)
  • mto: This revision was merged to the branch mainline in revision 5023.
  • Revision ID: john@arbash-meinel.com-20100210175208-bubuwav4uqigu291
Merge bzr.dev 5021 to resolve 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