/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: Martin Pool
  • Date: 2006-06-20 03:30:14 UTC
  • mfrom: (1793 +trunk)
  • mto: This revision was merged to the branch mainline in revision 1797.
  • Revision ID: mbp@sourcefrog.net-20060620033014-e19ce470e2ce6561
[merge] bzr.dev

Show diffs side-by-side

added added

removed removed

Lines of Context:
91
91
            self.assertEquals(msg, "bzr: broken pipe\n")
92
92
        else:
93
93
            self.fail("expected error not raised")
 
94
 
 
95
    def test_mutter_never_fails(self):
 
96
        # Even if the decode/encode stage fails, mutter should not
 
97
        # raise an exception
 
98
        mutter(u'Writing a greek mu (\xb5) works in a unicode string')
 
99
        mutter('But fails in an ascii string \xb5')
 
100
        # TODO: jam 20051227 mutter() doesn't flush the log file, and
 
101
        #       self._get_log() opens the file directly and reads it.
 
102
        #       So we need to manually flush the log file
 
103
        import bzrlib.trace
 
104
        bzrlib.trace._trace_file.flush()
 
105
        log = self._get_log()
 
106
        self.assertContainsRe(log, 'Writing a greek mu')
 
107
        self.assertContainsRe(log, 'UnicodeError')
 
108
        self.assertContainsRe(log, "'But fails in an ascii string")