~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_trace.py

  • Committer: John Arbash Meinel
  • Date: 2006-08-21 18:43:38 UTC
  • mto: This revision was merged to the branch mainline in revision 1953.
  • Revision ID: john@arbash-meinel.com-20060821184338-cb3b014ad7281e08
Update test_never_fails, to cover one of the failure points

Show diffs side-by-side

added added

removed removed

Lines of Context:
110
110
        # raise an exception
111
111
        mutter(u'Writing a greek mu (\xb5) works in a unicode string')
112
112
        mutter('But fails in an ascii string \xb5')
 
113
        mutter('and in an ascii argument: %s', '\xb5')
113
114
        # TODO: jam 20051227 mutter() doesn't flush the log file, and
114
115
        #       self._get_log() opens the file directly and reads it.
115
116
        #       So we need to manually flush the log file
116
 
        import bzrlib.trace
117
 
        bzrlib.trace._trace_file.flush()
 
117
        self._log_file.flush()
118
118
        log = self._get_log()
119
119
        self.assertContainsRe(log, 'Writing a greek mu')
120
120
        self.assertContainsRe(log, 'UnicodeError')
121
121
        self.assertContainsRe(log, "'But fails in an ascii string")
 
122
        self.assertContainsRe(log, ": %s', '\\\\xb5'")