~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/per_uifactory/__init__.py

  • Committer: John Arbash Meinel
  • Date: 2010-02-04 16:06:36 UTC
  • mfrom: (5007 +trunk)
  • mto: This revision was merged to the branch mainline in revision 5023.
  • Revision ID: john@arbash-meinel.com-20100204160636-xqeuwz8bwt8bbts4
Merge bzr.dev 5007, resolve conflict, update NEWS

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# Copyright (C) 2009-2010 Canonical Ltd
 
1
# Copyright (C) 2009, 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
137
137
 
138
138
    def _check_log_transport_activity_noarg(self):
139
139
        self.assertEqual('', self.stdout.getvalue())
140
 
        self.assertContainsRe(self.stderr.getvalue(), r'\d+KB\s+\dKB/s |')
 
140
        self.assertContainsRe(self.stderr.getvalue(), r'\d+kB\s+\dkB/s |')
141
141
        self.assertNotContainsRe(self.stderr.getvalue(), r'Transferred:')
142
142
 
143
143
    def _check_log_transport_activity_display(self):
170
170
 
171
171
            def __setattr__(self, name, value):
172
172
                return setattr(self._sio, name, value)
173
 
                
 
173
 
174
174
        # Remove 'TERM' == 'dumb' which causes us to *not* treat output as a
175
175
        # real terminal, even though isatty returns True
176
176
        self._captureVar('TERM', None)
181
181
 
182
182
    def _check_log_transport_activity_display(self):
183
183
        self.assertEqual('', self.stdout.getvalue())
184
 
        # Displaying the result should write to the progress stream
 
184
        # Displaying the result should write to the progress stream using
 
185
        # base-10 units (see HACKING.txt).
185
186
        self.assertContainsRe(self.stderr.getvalue(),
186
 
            r'Transferred: 7KiB'
187
 
            r' \(\d+\.\dK/s r:2K w:1K u:4K\)')
 
187
            r'Transferred: 7kB'
 
188
            r' \(\d+\.\dkB/s r:2kB w:1kB u:4kB\)')
188
189
 
189
190
    def _check_log_transport_activity_display_no_bytes(self):
190
191
        self.assertEqual('', self.stdout.getvalue())