~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_tree.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2006-10-15 16:32:29 UTC
  • mfrom: (1731.1.67 unique-root)
  • Revision ID: pqm@pqm.ubuntu.com-20061015163229-648b1f2ebe692136
New trees have unique root ids

Show diffs side-by-side

added added

removed removed

Lines of Context:
109
109
             ('compare', tree2, tree, 'unchanged', 'specific', 'extra',
110
110
              'require', True),
111
111
            ], RecordingOptimiser.calls)
 
112
 
 
113
    def test_changes_from_with_root(self):
 
114
        """Ensure the include_root option does what's expected."""
 
115
        wt = self.make_branch_and_tree('.')
 
116
        delta = wt.changes_from(wt.basis_tree())
 
117
        self.assertEqual(len(delta.added), 0)
 
118
        delta = wt.changes_from(wt.basis_tree(), wt, include_root=True)
 
119
        self.assertEqual(len(delta.added), 1)
 
120
        self.assertEqual(delta.added[0][0], '')