~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_tree.py

  • Committer: Martin Pool
  • Date: 2006-11-02 10:20:19 UTC
  • mfrom: (2114 +trunk)
  • mto: This revision was merged to the branch mainline in revision 2119.
  • Revision ID: mbp@sourcefrog.net-20061102102019-9a5a02f485dff6f6
merge bzr.dev and reconcile several changes, also some test fixes

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# Copyright (C) 2006 by Canonical Ltd
 
1
# Copyright (C) 2006 Canonical Ltd
2
2
#
3
3
# This program is free software; you can redistribute it and/or modify
4
4
# it under the terms of the GNU General Public License as published by
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], '')