~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_errors.py

  • Committer: Andrew Bennetts
  • Date: 2007-06-14 11:23:38 UTC
  • mto: (2506.2.7 container-format)
  • mto: This revision was merged to the branch mainline in revision 2572.
  • Revision ID: andrew.bennetts@canonical.com-20070614112338-6u3900u6nkag66u8
Return a callable instead of a str from read, and add more validation.

Show diffs side-by-side

added added

removed removed

Lines of Context:
300
300
            "Container has data after end marker: 'excess bytes'",
301
301
            str(e))
302
302
 
 
303
    def test_duplicate_record_name_error(self):
 
304
        """Test the formatting of DuplicateRecordNameError."""
 
305
        e = errors.DuplicateRecordNameError(u"n\xe5me".encode('utf-8'))
 
306
        self.assertEqual(
 
307
            "Container has multiple records with the same name: \"n\xc3\xa5me\"",
 
308
            str(e))
 
309
 
303
310
 
304
311
class PassThroughError(errors.BzrError):
305
312