~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/per_workingtree/test_locking.py

  • Committer: Martin Pool
  • Date: 2009-08-26 05:38:16 UTC
  • mfrom: (4634.6.2 2.0)
  • mto: (4634.6.4 2.0)
  • mto: This revision was merged to the branch mainline in revision 4660.
  • Revision ID: mbp@sourcefrog.net-20090826053816-ht6jpktdm77vi6t5
MergeĀ 2.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
105
105
 
106
106
        :param methodname: The lock method to use to establish locks.
107
107
        """
 
108
        # This write locks the local tree, and then grabs a read lock on a
 
109
        # copy, which is bogus and the test just needs to be rewritten.
 
110
        self.thisFailsStrictLockCheck()
108
111
        # when unlocking the last lock count from tree_write_lock,
109
112
        # the tree should do a flush().
110
113
        # we test that by changing the inventory using set_root_id
128
131
        tree.set_root_id('new-root')
129
132
        # to detect that the inventory is written by unlock, we
130
133
        # first check that it was not written yet.
 
134
        # TODO: This requires taking a read lock while we are holding the above
 
135
        #       write lock, which shouldn't actually be possible
131
136
        reference_tree = tree.bzrdir.open_workingtree()
132
137
        self.assertEqual(old_root, reference_tree.get_root_id())
133
138
        # now unlock the second held lock, which should do nothing.