/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 from bzr.dev, resolving the worst of the semantic conflicts, but there's
still a little bit of breakage.

Show diffs side-by-side

added added

removed removed

Lines of Context:
35
35
        self.assertEqualDiff(
36
36
            "The smart server method 'class name' is disabled.", str(error))
37
37
 
 
38
    def test_duplicate_file_id(self):
 
39
        error = errors.DuplicateFileId('a_file_id', 'foo')
 
40
        self.assertEqualDiff('File id {a_file_id} already exists in inventory'
 
41
                             ' as foo', str(error))
 
42
 
38
43
    def test_inventory_modified(self):
39
44
        error = errors.InventoryModified("a tree to be repred")
40
45
        self.assertEqualDiff("The current inventory for the tree 'a tree to "
51
56
        error = errors.InstallFailed([None])
52
57
        self.assertEqual("Could not install revisions:\nNone", str(error))
53
58
 
 
59
    def test_lock_active(self):
 
60
        error = errors.LockActive("lock description")
 
61
        self.assertEqualDiff("The lock for 'lock description' is in use and "
 
62
            "cannot be broken.",
 
63
            str(error))
 
64
 
54
65
    def test_knit_header_error(self):
55
66
        error = errors.KnitHeaderError('line foo\n', 'path/to/file')
56
67
        self.assertEqual("Knit header error: 'line foo\\n' unexpected"
86
97
            "atree.",
87
98
            str(error))
88
99
 
 
100
    def test_no_such_revision_in_tree(self):
 
101
        error = errors.NoSuchRevisionInTree("atree", "anid")
 
102
        self.assertEqualDiff("The revision id anid is not present in the tree "
 
103
            "atree.",
 
104
            str(error))
 
105
        self.assertIsInstance(error, errors.NoSuchRevision)
 
106
 
89
107
    def test_not_write_locked(self):
90
108
        error = errors.NotWriteLocked('a thing to repr')
91
109
        self.assertEqualDiff("'a thing to repr' is not write locked but needs "