/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_dirstate.py

Better DirState._validate and tests for it.

Show diffs side-by-side

added added

removed removed

Lines of Context:
2092
2092
        self.assertContainsRe(str(e),
2093
2093
            "doesn't match directory name")
2094
2094
 
 
2095
    def test_dirblock_missing_rename(self):
 
2096
        tree, state, expected = self.create_renamed_dirstate()
 
2097
        state._read_dirblocks_if_needed()
 
2098
        last_dirblock = state._dirblocks[-1]
2095
2099
        # make another entry for a-id, without a correct 'r' pointer to
2096
2100
        # the real occurrence in the working tree
 
2101
        last_dirblock[1].append(
 
2102
            (('h', 'z', 'a-id'),
 
2103
             [('a', '', 0, False, ''),
 
2104
              ('a', '', 0, False, '')]))
 
2105
        e = self.assertRaises(AssertionError,
 
2106
            state._validate)
 
2107
        self.assertContainsRe(str(e),
 
2108
            'file a-id is absent in row')