~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_trace.py

  • Committer: Ian Clatworthy
  • Date: 2008-03-27 07:51:10 UTC
  • mto: (3311.1.1 ianc-integration)
  • mto: This revision was merged to the branch mainline in revision 3312.
  • Revision ID: ian.clatworthy@canonical.com-20080327075110-afgd7x03ybju06ez
Reduce evangelism in the User Guide

Show diffs side-by-side

added added

removed removed

Lines of Context:
93
93
        self.assertTrue(len(msg) > 0)
94
94
        self.assertEqualDiff(msg, 'bzr: ERROR: Not a branch: \"wibble\".\n')
95
95
 
96
 
    def test_report_external_import_error(self):
97
 
        """Short friendly message for missing system modules."""
98
 
        try:
99
 
            import ImaginaryModule
100
 
        except ImportError, e:
101
 
            pass
102
 
        else:
103
 
            self.fail("somehow succeeded in importing %r" % ImaginaryModule)
104
 
        msg = _format_exception()
105
 
        self.assertEqual(msg,
106
 
            'bzr: ERROR: No module named ImaginaryModule\n'
107
 
            'You may need to install this Python library separately.\n')
108
 
 
109
 
    def test_report_import_syntax_error(self):
110
 
        try:
111
 
            raise ImportError("syntax error")
112
 
        except ImportError, e:
113
 
            pass
114
 
        msg = _format_exception()
115
 
        self.assertContainsRe(msg,
116
 
            r"Traceback \(most recent call last\)")
117
 
 
118
96
    def test_trace_unicode(self):
119
97
        """Write Unicode to trace log"""
120
98
        self.log(u'the unicode character for benzene is \N{BENZENE RING}')