/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: Breezy landing bot
  • Author(s): Jelmer Vernooij
  • Date: 2018-07-25 18:15:53 UTC
  • mfrom: (7045.4.7 python3-s)
  • Revision ID: breezy.the.bot@gmail.com-20180725181553-mz6zhncntlovb8ii
Fix another couple of hundred tests on Python 3.

Merged from https://code.launchpad.net/~jelmer/brz/python3-s/+merge/350749

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."""