~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_workingtree_4.py

Alter intertree implementation tests to let dirstate inter-trees be correctly parameterised.

Show diffs side-by-side

added added

removed removed

Lines of Context:
284
284
        lock_and_compare_all_current_dirstate(tree, 'lock_write')
285
285
        lock_and_compare_all_current_dirstate(tree, 'lock_write')
286
286
 
 
287
    def test_constructing_invalid_interdirstate_raises(self):
 
288
        tree = self.make_workingtree()
 
289
        rev_id = tree.commit('first post')
 
290
        rev_id2 = tree.commit('second post')
 
291
        rev_tree = tree.branch.repository.revision_tree(rev_id)
 
292
        # Exception is not a great thing to raise, but this test is 
 
293
        # very short, and code is used to sanity check other tests, so 
 
294
        # a full error object is YAGNI.
 
295
        self.assertRaises(
 
296
            Exception, workingtree_4.InterDirStateTree, rev_tree, tree)
 
297
        self.assertRaises(
 
298
            Exception, workingtree_4.InterDirStateTree, tree, rev_tree)
 
299
 
287
300
    def test_revtree_to_revtree_not_interdirstate(self):
288
301
        # we should not get a dirstate optimiser for two repository sourced
289
302
        # revtrees. we can't prove a negative, so we dont do exhaustive tests