/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-15 05:49:38 UTC
  • mto: This revision was merged to the branch mainline in revision 1797.
  • Revision ID: mbp@sourcefrog.net-20060615054938-5025f2075db2bf14
Add test for formatting of EPIPE

Show diffs side-by-side

added added

removed removed

Lines of Context:
20
20
 
21
21
"""Tests for trace library"""
22
22
 
 
23
import errno
23
24
import os
24
25
import sys
25
26
from StringIO import StringIO
83
84
        self.log(u'the unicode character for benzene is \N{BENZENE RING}')
84
85
        self.assertContainsRe('the unicode character',
85
86
                self._get_log())
 
87
 
 
88
    def test_report_broken_pipe(self):
 
89
        try:
 
90
            raise IOError(errno.EPIPE, 'broken pipe foofofo')
 
91
        except IOError, e:
 
92
            msg = _format_exception()
 
93
            self.assertEquals(msg, "bzr: broken pipe\n")
 
94
        else:
 
95
            self.fail("expected error not raised")