Make sure we properly close the bzr WorkingTree in our Authors up-to-datedness unit test.
This commit is contained in:
@@ -30,6 +30,7 @@ class ProjectTestCase(test.TrialTestCase):
|
|||||||
import bzrlib.workingtree
|
import bzrlib.workingtree
|
||||||
tree = bzrlib.workingtree.WorkingTree.open('..')
|
tree = bzrlib.workingtree.WorkingTree.open('..')
|
||||||
tree.lock_read()
|
tree.lock_read()
|
||||||
|
try:
|
||||||
parents = tree.get_parent_ids()
|
parents = tree.get_parent_ids()
|
||||||
g = tree.branch.repository.get_graph()
|
g = tree.branch.repository.get_graph()
|
||||||
for p in parents[1:]:
|
for p in parents[1:]:
|
||||||
@@ -50,3 +51,5 @@ class ProjectTestCase(test.TrialTestCase):
|
|||||||
|
|
||||||
self.assertTrue(len(missing) == 0,
|
self.assertTrue(len(missing) == 0,
|
||||||
'%r not listed in Authors' % missing)
|
'%r not listed in Authors' % missing)
|
||||||
|
finally:
|
||||||
|
tree.unlock()
|
||||||
|
|||||||
Reference in New Issue
Block a user