/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 bzr.dev

Show diffs side-by-side

added added

removed removed

Lines of Context:
26
26
from bzrlib.tests import TestCase, TestCaseWithTransport
27
27
 
28
28
 
29
 
 
30
29
class TestErrors(TestCaseWithTransport):
31
30
 
32
31
    def test_disabled_method(self):
382
381
        self.assertEqual(
383
382
            "Corrupt or incompatible data stream: my reason", str(e))
384
383
 
 
384
    def test_immortal_pending_deletion_message(self):
 
385
        err = errors.ImmortalPendingDeletion('foo')
 
386
        self.assertEquals(
 
387
            "Unable to delete transform temporary directory foo.  "
 
388
            "Please examine foo to see if it contains any files "
 
389
            "you wish to keep, and delete it when you are done.",
 
390
            str(err))
 
391
 
 
392
    def test_unable_create_symlink(self):
 
393
        err = errors.UnableCreateSymlink()
 
394
        self.assertEquals(
 
395
            "Unable to create symlink on this platform",
 
396
            str(err))
 
397
        err = errors.UnableCreateSymlink(path=u'foo')
 
398
        self.assertEquals(
 
399
            "Unable to create symlink 'foo' on this platform",
 
400
            str(err))
 
401
        err = errors.UnableCreateSymlink(path=u'\xb5')
 
402
        self.assertEquals(
 
403
            "Unable to create symlink u'\\xb5' on this platform",
 
404
            str(err))
 
405
 
385
406
 
386
407
class PassThroughError(errors.BzrError):
387
408