/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/intertree_implementations/test_compare.py

compare_subtrees skips formats that can't do subtrees

Show diffs side-by-side

added added

removed removed

Lines of Context:
626
626
    def test_compare_subtrees(self):
627
627
        """want_unchanged should generate a list of unchanged entries."""
628
628
        tree1 = self.make_branch_and_tree('1')
 
629
        if not tree1.supports_tree_reference():
 
630
            raise tests.TestSkipped('Tree %s does not support references'
 
631
                % (tree1,))
629
632
        tree1.set_root_id('root-id')
630
633
        subtree1 = self.make_branch_and_tree('1/sub')
631
634
        subtree1.set_root_id('subtree-id')
632
 
        try:
633
 
            tree1.add_reference(subtree1)
634
 
        except errors.UnsupportedOperation:
635
 
            self.assertIsInstance(tree1, workingtree_4.WorkingTree4)
636
 
            raise tests.TestSkipped('Tree does not support references')
 
635
        tree1.add_reference(subtree1)
637
636
 
638
637
        tree2 = self.make_to_branch_and_tree('2')
 
638
        if not tree2.supports_tree_reference():
 
639
            raise tests.TestSkipped('Tree %s does not support references'
 
640
                % (tree2,))
639
641
        tree2.set_root_id('root-id')
640
642
        subtree2 = self.make_to_branch_and_tree('2/sub')
641
643
        subtree2.set_root_id('subtree-id')