Make sure we properly close the bzr WorkingTree in our Authors up-to-datedness unit test.

This commit is contained in:
Soren Hansen
2010-12-15 20:04:19 +00:00
committed by Tarmac

View File

@@ -30,6 +30,7 @@ class ProjectTestCase(test.TrialTestCase):
import bzrlib.workingtree
tree = bzrlib.workingtree.WorkingTree.open('..')
tree.lock_read()
try:
parents = tree.get_parent_ids()
g = tree.branch.repository.get_graph()
for p in parents[1:]:
@@ -50,3 +51,5 @@ class ProjectTestCase(test.TrialTestCase):
self.assertTrue(len(missing) == 0,
'%r not listed in Authors' % missing)
finally:
tree.unlock()