~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_errors.py

  • Committer: John Arbash Meinel
  • Date: 2006-12-21 20:07:34 UTC
  • mto: This revision was merged to the branch mainline in revision 2212.
  • Revision ID: john@arbash-meinel.com-20061221200734-3kqiep3996uxtwsc
Add an exception class when the knit index storage method is unknown, and properly test for it

Show diffs side-by-side

added added

removed removed

Lines of Context:
51
51
        self.assertEqual("Knit header error: 'line foo\\n' unexpected"
52
52
                         " for file path/to/file", str(error))
53
53
 
 
54
    def test_knit_index_unknown_method(self):
 
55
        error = errors.KnitIndexUnknownMethod('http://host/foo.kndx',
 
56
                                              ['bad', 'no-eol'])
 
57
        self.assertEqual("Knit index http://host/foo.kndx does not have a"
 
58
                         " known method in options: ['bad', 'no-eol']",
 
59
                         str(error))
 
60
 
54
61
    def test_medium_not_connected(self):
55
62
        error = errors.MediumNotConnected("a medium")
56
63
        self.assertEqualDiff(