~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_lockable_files.py

update tests somewhat

Show diffs side-by-side

added added

removed removed

Lines of Context:
21
21
from bzrlib.errors import NoSuchFile, ReadOnlyError
22
22
from StringIO import StringIO
23
23
 
 
24
 
24
25
class TestLockableFiles(TestCaseInTempDir):
 
26
 
25
27
    def setUp(self):
26
 
        super(self.__class__, self).setUp()
 
28
        super(TestLockableFiles, self).setUp()
27
29
        transport = get_transport('.')
28
30
        transport.mkdir('.bzr')
29
31
        transport.put('.bzr/my-lock', StringIO(''))
73
75
        self.assertIs(self.lockable.get_transaction().__class__,
74
76
                      PassThroughTransaction)
75
77
        self.lockable.unlock()
 
78
 
 
79
    def test__escape(self):
 
80
        self.assertEqual('%25', self.lockable._escape('%'))
 
81
        
 
82
    def test__escape_empty(self):
 
83
        branch = Branch.initialize('.')
 
84
        self.assertEqual('', self.lockable._escape(''))
 
85