/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/workingtree_implementations/test_parents.py

  • Committer: Robert Collins
  • Date: 2006-09-05 08:14:23 UTC
  • mto: (1852.16.2 Tree.walkdirs)
  • mto: This revision was merged to the branch mainline in revision 1993.
  • Revision ID: robertc@robertcollins.net-20060905081423-b1bc9b092a9f8597
DeprecateĀ WorkingTree.last_revision.

Show diffs side-by-side

added added

removed removed

Lines of Context:
26
26
class TestParents(TestCaseWithWorkingTree):
27
27
 
28
28
    def assertConsistentParents(self, expected, tree):
 
29
        """Check that the parents found are as expected.
 
30
 
 
31
        This test helper also checks that they are consistent with
 
32
        the pre-get_parent_ids() api - which is now deprecated.
 
33
        """
29
34
        self.assertEqual(expected, tree.get_parent_ids())
 
35
        last_rev_deprecations = [
 
36
            '%s.%s.%s was deprecated in version 0.11.' 
 
37
            % (tree.__class__.__module__,
 
38
               tree.__class__.__name__,
 
39
               tree.last_revision.__name__)]
30
40
        if expected == []:
31
 
            self.assertEqual(None, tree.last_revision())
 
41
            self.assertEqual(None,
 
42
                self.callDeprecated(last_rev_deprecations, tree.last_revision))
32
43
        else:
33
 
            self.assertEqual(expected[0], tree.last_revision())
34
 
        self.assertEqual(expected[1:], tree.pending_merges())
 
44
            self.assertEqual(expected[0],
 
45
                self.callDeprecated(last_rev_deprecations, tree.last_revision))
 
46
        self.assertEqual(expected[1:],
 
47
            self.callDeprecated([], tree.pending_merges))
35
48
 
36
49
 
37
50
class TestSetParents(TestParents):