~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_errors.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2008-09-02 19:46:10 UTC
  • mfrom: (3640.2.6 dirstate_segv_186014)
  • Revision ID: pqm@pqm.ubuntu.com-20080902194610-1zzkeem0cm38snju
(jam) Fix bug #186014 by giving a proper exception if the dirstate
        cannot be parsed.

Show diffs side-by-side

added added

removed removed

Lines of Context:
45
45
            "Error: the reason why",
46
46
            str(error))
47
47
 
 
48
    def test_dirstate_corrupt(self):
 
49
        error = errors.DirstateCorrupt('.bzr/checkout/dirstate',
 
50
                                       'trailing garbage: "x"')
 
51
        self.assertEqualDiff("The dirstate file (.bzr/checkout/dirstate)"
 
52
            " appears to be corrupt: trailing garbage: \"x\"",
 
53
            str(error))
 
54
 
48
55
    def test_disabled_method(self):
49
56
        error = errors.DisabledMethod("class name")
50
57
        self.assertEqualDiff(