/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to breezy/tests/per_tree/test_get_root_id.py

  • Committer: Jelmer Vernooij
  • Date: 2018-03-24 17:48:04 UTC
  • mfrom: (6921 work)
  • mto: This revision was merged to the branch mainline in revision 6923.
  • Revision ID: jelmer@jelmer.uk-20180324174804-xf22o05byoj12x1q
Merge trunk.

Show diffs side-by-side

added added

removed removed

Lines of Context:
39
39
 
40
40
    def test_get_root_id_default(self):
41
41
        tree = self.make_tree_with_default_root_id()
42
 
        tree.lock_read()
43
 
        self.addCleanup(tree.unlock)
44
 
        self.assertIsNot(None, tree.get_root_id())
 
42
        with tree.lock_read():
 
43
            self.assertIsNot(None, tree.get_root_id())
45
44
 
46
45
    def test_get_root_id_fixed(self):
47
46
        tree = self.make_tree_with_fixed_root_id()
48
 
        tree.lock_read()
49
 
        self.addCleanup(tree.unlock)
50
 
        self.assertEqual('custom-tree-root-id', tree.get_root_id())
 
47
        with tree.lock_read():
 
48
            self.assertEqual('custom-tree-root-id', tree.get_root_id())
51
49