~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_trace.py

(vila) Make all transport put_bytes() raises TypeError when given unicode
 strings rather than bytes (Vincent Ladeuil)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# Copyright (C) 2005-2011, 2016 Canonical Ltd
 
1
# Copyright (C) 2005-2011 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
82
82
        except MemoryError:
83
83
            pass
84
84
        msg = _format_exception()
85
 
        self.assertEqual(msg,
 
85
        self.assertEquals(msg,
86
86
            "bzr: out of memory\nUse -Dmem_dump to dump memory to a file.\n")
87
87
 
88
88
    def test_format_mem_dump(self):
204
204
    def test_report_broken_pipe(self):
205
205
        try:
206
206
            raise IOError(errno.EPIPE, 'broken pipe foofofo')
207
 
        except IOError as e:
 
207
        except IOError, e:
208
208
            msg = _format_exception()
209
 
            self.assertEqual(msg, "bzr: broken pipe\n")
 
209
            self.assertEquals(msg, "bzr: broken pipe\n")
210
210
        else:
211
211
            self.fail("expected error not raised")
212
212