~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_versionedfile.py

Merged bzr.dev

Show diffs side-by-side

added added

removed removed

Lines of Context:
140
140
        except NotImplementedError:
141
141
            pass
142
142
 
 
143
    def test_add_reserved(self):
 
144
        vf = self.get_file()
 
145
        self.assertRaises(errors.ReservedId,
 
146
            vf.add_lines, 'a:', [], ['a\n', 'b\n', 'c\n'])
 
147
 
 
148
        self.assertRaises(errors.ReservedId,
 
149
            vf.add_delta, 'a:', [], None, 'sha1', False, ((0, 0, 0, []),))
 
150
 
 
151
    def test_get_reserved(self):
 
152
        vf = self.get_file()
 
153
        self.assertRaises(errors.ReservedId, vf.get_delta, 'b:')
 
154
        self.assertRaises(errors.ReservedId, vf.get_texts, ['b:'])
 
155
        self.assertRaises(errors.ReservedId, vf.get_lines, 'b:')
 
156
        self.assertRaises(errors.ReservedId, vf.get_text, 'b:')
 
157
 
143
158
    def test_get_delta(self):
144
159
        f = self.get_file()
145
160
        sha1s = self._setup_for_deltas(f)