~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_workingtree_4.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2011-05-20 11:07:31 UTC
  • mfrom: (5340.12.29 2.4-613247-test-cases)
  • Revision ID: pqm@pqm.ubuntu.com-20110520110731-8slefcqat6dr3asl
(jameinel) Bug #613247,
 clean up a bunch of test cases to avoid putting 'self' in the reference
 cycle. (John A Meinel)

Show diffs side-by-side

added added

removed removed

Lines of Context:
174
174
        # it's given; any calls to forbidden methods will raise an
175
175
        # AssertionError
176
176
        repo = tree.branch.repository
177
 
        repo.get_revision = self.fail
178
 
        repo.get_inventory = self.fail
179
 
        repo._get_inventory_xml = self.fail
 
177
        self.overrideAttr(repo, "get_revision", self.fail)
 
178
        self.overrideAttr(repo, "get_inventory", self.fail)
 
179
        self.overrideAttr(repo, "_get_inventory_xml", self.fail)
180
180
        # try to set the parent trees.
181
181
        tree.set_parent_trees([(rev1, rev1_tree)])
182
182
 
214
214
        # answer 'get_parent_ids' for the revision tree- dirstate does not
215
215
        # cache the parents of a parent tree at this point.
216
216
        #repo.get_revision = self.fail
217
 
        repo.get_inventory = self.fail
218
 
        repo._get_inventory_xml = self.fail
 
217
        self.overrideAttr(repo, "get_inventory", self.fail)
 
218
        self.overrideAttr(repo, "_get_inventory_xml", self.fail)
219
219
        # set the parent trees.
220
220
        tree.set_parent_trees([(rev1, rev1_tree), (rev2, rev2_tree)])
221
221
        # read the first tree