~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_lockable_files.py

Merge transaction finalisation and ensure iter_lines_added_or_present in knits does a old-to-new read in the knit.

Show diffs side-by-side

added added

removed removed

Lines of Context:
21
21
from bzrlib.lockable_files import LockableFiles, TransportLock
22
22
from bzrlib.lockdir import LockDir
23
23
from bzrlib.tests import TestCaseInTempDir
 
24
from bzrlib.tests.test_transactions import DummyWeave
24
25
from bzrlib.transactions import (PassThroughTransaction,
25
26
                                 ReadOnlyTransaction,
26
27
                                 WriteTransaction,
82
83
        self.lockable.lock_write()
83
84
        self.assertIs(self.lockable.get_transaction().__class__,
84
85
                      WriteTransaction)
 
86
        # check that finish is called:
 
87
        vf = DummyWeave('a')
 
88
        self.lockable.get_transaction().register_dirty(vf)
85
89
        self.lockable.unlock()
 
90
        self.assertTrue(vf.finished)
86
91
 
87
92
    def test__escape(self):
88
93
        self.assertEqual('%25', self.lockable._escape('%'))