49
46
tree = self.make_branch_and_tree('tree')
50
47
# prepare for a series of changes that will modify the
56
52
# to detect that the inventory is written by flush, we
57
53
# first check that it was not written yet.
58
54
reference_tree = tree.controldir.open_workingtree()
60
56
# now flush the tree which should write the inventory.
62
58
# and check it was written using another reference tree
63
59
reference_tree = tree.controldir.open_workingtree()
68
62
def test_flush_with_read_lock_fails(self):
69
63
"""Flush cannot be used during a read lock."""
70
64
tree = self.make_branch_and_tree('t1')
73
66
self.assertRaises(errors.NotWriteLocked, tree.flush)
77
68
def test_flush_with_no_lock_fails(self):
78
69
tree = self.make_branch_and_tree('t1')