/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

  • Committer: Robert Collins
  • Date: 2008-04-04 00:43:07 UTC
  • mfrom: (3331 +trunk)
  • mto: This revision was merged to the branch mainline in revision 3333.
  • Revision ID: robertc@robertcollins.net-20080404004307-0whomfhm3yal2rvw
Resolve conflicts.

Show diffs side-by-side

added added

removed removed

Lines of Context:
21
21
from bzrlib import (
22
22
    bzrdir,
23
23
    errors,
 
24
    osutils,
24
25
    symbol_versioning,
25
26
    urlutils,
26
27
    )
445
446
            "Unable to create symlink u'\\xb5' on this platform",
446
447
            str(err))
447
448
 
 
449
    def test_invalid_url_join(self):
 
450
        """Test the formatting of InvalidURLJoin."""
 
451
        e = errors.InvalidURLJoin('Reason', 'base path', ('args',))
 
452
        self.assertEqual(
 
453
            "Invalid URL join request: Reason: 'base path' + ('args',)",
 
454
            str(e))
 
455
 
448
456
    def test_incorrect_url(self):
449
457
        err = errors.InvalidBugTrackerURL('foo', 'http://bug.com/')
450
458
        self.assertEquals(
452
460
             "http://bug.com/"),
453
461
            str(err))
454
462
 
 
463
    def test_unable_encode_path(self):
 
464
        err = errors.UnableEncodePath('foo', 'executable')
 
465
        self.assertEquals("Unable to encode executable path 'foo' in "
 
466
            "user encoding " + osutils.get_user_encoding(),
 
467
            str(err))
 
468
 
 
469
    def test_unknown_format(self):
 
470
        err = errors.UnknownFormatError('bar', kind='foo')
 
471
        self.assertEquals("Unknown foo format: 'bar'", str(err))
 
472
 
455
473
 
456
474
class PassThroughError(errors.BzrError):
457
475