~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/workingtree_implementations/test_flush.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2009-02-23 17:00:36 UTC
  • mfrom: (4032.1.4 jam-integration)
  • Revision ID: pqm@pqm.ubuntu.com-20090223170036-3q1v68ewdt8i0to5
(Marius Kruger) Remove all trailing whitespace and add tests to
        enforce this.

Show diffs side-by-side

added added

removed removed

Lines of Context:
36
36
        # _set_inventory for now until add etc have lazy writes of
37
37
        # the inventory on unlock).
38
38
        tree = self.make_branch_and_tree('tree')
39
 
        # prepare for a series of changes that will modify the 
 
39
        # prepare for a series of changes that will modify the
40
40
        # inventory
41
41
        tree.lock_write()
42
42
        try:
53
53
            self.assertEqual('new-root', reference_tree.get_root_id())
54
54
        finally:
55
55
            tree.unlock()
56
 
            
 
56
 
57
57
    def test_flush_with_read_lock_fails(self):
58
58
        """Flush cannot be used during a read lock."""
59
59
        tree = self.make_branch_and_tree('t1')
62
62
            self.assertRaises(errors.NotWriteLocked, tree.flush)
63
63
        finally:
64
64
            tree.unlock()
65
 
            
 
65
 
66
66
    def test_flush_with_no_lock_fails(self):
67
67
        tree = self.make_branch_and_tree('t1')
68
68
        self.assertRaises(errors.NotWriteLocked, tree.flush)