/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_trace.py

  • Committer: Robert Collins
  • Date: 2010-05-11 08:36:16 UTC
  • mto: This revision was merged to the branch mainline in revision 5223.
  • Revision ID: robertc@robertcollins.net-20100511083616-b8fjb19zomwupid0
Make all lock methods return Result objects, rather than lock_read returning self, as per John's review.

Show diffs side-by-side

added added

removed removed

Lines of Context:
29
29
    errors,
30
30
    trace,
31
31
    )
32
 
from bzrlib.tests import features, TestCaseInTempDir, TestCase
 
32
from bzrlib.tests import TestCaseInTempDir, TestCase
33
33
from bzrlib.trace import (
34
34
    mutter, mutter_callsite, report_exception,
35
35
    set_verbosity_level, get_verbosity_level, is_quiet, is_verbose, be_quiet,
104
104
        self.assertContainsRe(msg,
105
105
            r'^bzr: ERROR: \[Errno .*\] No such file.*nosuchfile')
106
106
 
107
 
    def test_format_pywintypes_error(self):
108
 
        self.requireFeature(features.pywintypes)
109
 
        import pywintypes, win32file
110
 
        try:
111
 
            win32file.RemoveDirectory('nosuchfile22222')
112
 
        except pywintypes.error:
113
 
            pass
114
 
        msg = _format_exception()
115
 
        # GZ 2010-05-03: Formatting for pywintypes.error is basic, a 3-tuple
116
 
        #                with errno, function name, and locale error message
117
 
        self.assertContainsRe(msg,
118
 
            r"^bzr: ERROR: \(2, 'RemoveDirectory[AW]?', .*\)")
119
 
 
120
107
    def test_format_unicode_error(self):
121
108
        try:
122
109
            raise errors.BzrCommandError(u'argument foo\xb5 does not exist')