~bzr-pqm/bzr/bzr.dev

« 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):
390
389
            "you wish to keep, and delete it when you are done.",
391
390
            str(err))
392
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
 
393
406
 
394
407
class PassThroughError(errors.BzrError):
395
408