/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: Andrew Bennetts
  • Date: 2009-08-21 00:04:55 UTC
  • mfrom: (4634 +trunk)
  • mto: This revision was merged to the branch mainline in revision 4639.
  • Revision ID: andrew.bennetts@canonical.com-20090821000455-6oygnl6rt3291bwp
Merge from bzr.dev.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# Copyright (C) 2005, 2006, 2007, 2008 Canonical Ltd
 
1
# Copyright (C) 2005, 2006, 2007, 2008, 2009 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
48
48
class TestTrace(TestCase):
49
49
 
50
50
    def test_format_sys_exception(self):
 
51
        # Test handling of an internal/unexpected error that probably
 
52
        # indicates a bug in bzr.  The details of the message may vary
 
53
        # depending on whether apport is available or not.  See test_crash for
 
54
        # more.
51
55
        try:
52
56
            raise NotImplementedError, "time travel"
53
57
        except NotImplementedError:
56
60
        self.assertEqualDiff(err.splitlines()[0],
57
61
                'bzr: ERROR: exceptions.NotImplementedError: time travel')
58
62
        self.assertContainsRe(err,
59
 
                r'File.*test_trace.py')
 
63
            'Bazaar has encountered an internal error.')
60
64
 
61
65
    def test_format_interrupt_exception(self):
62
66
        try:
122
126
            pass
123
127
        msg = _format_exception()
124
128
        self.assertContainsRe(msg,
125
 
            r"Traceback \(most recent call last\)")
 
129
            r'Bazaar has encountered an internal error')
126
130
 
127
131
    def test_trace_unicode(self):
128
132
        """Write Unicode to trace log"""