/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/plugins/git/tests/test_memorytree.py

  • Committer: Jelmer Vernooij
  • Date: 2018-07-23 22:25:11 UTC
  • mto: This revision was merged to the branch mainline in revision 7053.
  • Revision ID: jelmer@jelmer.uk-20180723222511-gns8mqohgakwa2b9
Some brz-git fixes.

Show diffs side-by-side

added added

removed removed

Lines of Context:
45
45
        wt.add(['foo'])
46
46
        rev_id = wt.commit('first post')
47
47
        tree = wt.branch.create_memorytree()
48
 
        tree.lock_read()
49
 
        self.assertEqual([rev_id], tree.get_parent_ids())
50
 
        self.assertEqual('contents of sometree/foo\n',
51
 
            tree.get_file('foo').read())
52
 
        tree.unlock()
 
48
        with tree.lock_read():
 
49
            self.assertEqual([rev_id], tree.get_parent_ids())
 
50
            self.assertEqual(b'contents of sometree/foo\n',
 
51
                tree.get_file('foo').read())
53
52
 
54
53
    def test_lock_tree_write(self):
55
54
        """Check we can lock_tree_write and unlock MemoryTrees."""