/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_errors.py

Merge real container implementation

Show diffs side-by-side

added added

removed removed

Lines of Context:
266
266
            "Could not understand response from smart server: ('not yes',)",
267
267
            str(e))
268
268
 
 
269
    def test_unknown_container_format(self):
 
270
        """Test the formatting of UnknownContainerFormatError."""
 
271
        e = errors.UnknownContainerFormatError('bad format string')
 
272
        self.assertEqual(
 
273
            "Unrecognised container format: 'bad format string'",
 
274
            str(e))
 
275
 
 
276
    def test_unexpected_end_of_container(self):
 
277
        """Test the formatting of UnexpectedEndOfContainerError."""
 
278
        e = errors.UnexpectedEndOfContainerError()
 
279
        self.assertEqual(
 
280
            "Unexpected end of container stream", str(e))
 
281
 
 
282
    def test_unknown_record_type(self):
 
283
        """Test the formatting of UnknownRecordTypeError."""
 
284
        e = errors.UnknownRecordTypeError("X")
 
285
        self.assertEqual(
 
286
            "Unknown record type: 'X'",
 
287
            str(e))
 
288
 
 
289
    def test_invalid_record(self):
 
290
        """Test the formatting of InvalidRecordError."""
 
291
        e = errors.InvalidRecordError("xxx")
 
292
        self.assertEqual(
 
293
            "Invalid record: xxx",
 
294
            str(e))
 
295
 
269
296
 
270
297
class PassThroughError(errors.BzrError):
271
298