~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-07-17 16:46:44 UTC
  • mto: (5050.3.10 2.2)
  • mto: This revision was merged to the branch mainline in revision 5365.
  • Revision ID: mbp@canonical.com-20100717164644-uu4uhamdunf3mxzc
One more UI test needs updates for spinner being at the front

Show diffs side-by-side

added added

removed removed

Lines of Context:
148
148
        factory = _mod_ui_text.TextUIFactory(
149
149
            stdin=tests.StringIOWrapper("yada\ny\n"),
150
150
            stdout=out, stderr=out)
 
151
        factory._avail_width = lambda: 79
151
152
        pb = factory.nested_progress_bar()
152
153
        pb.show_bar = False
153
154
        pb.show_spinner = False
159
160
                                               factory.get_boolean,
160
161
                                               "what do you want"))
161
162
        output = out.getvalue()
162
 
        self.assertContainsRe(factory.stdout.getvalue(),
163
 
            "foo *\r\r  *\r*")
164
 
        self.assertContainsRe(factory.stdout.getvalue(),
 
163
        self.assertContainsRe(output,
 
164
            "| foo *\r\r  *\r*")
 
165
        self.assertContainsRe(output,
165
166
            r"what do you want\? \[y/n\]: what do you want\? \[y/n\]: ")
166
167
        # stdin should have been totally consumed
167
168
        self.assertEqual('', factory.stdin.readline())