~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/per_lock/test_lock.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2007-03-15 23:19:15 UTC
  • mfrom: (2353.3.13 lock_cleanup)
  • Revision ID: pqm@pqm.ubuntu.com-20070315231915-000d2bef502ae12b
(John Arbash Meinel, Alexander Belchenko) some small cleanups for the new lock code.

Show diffs side-by-side

added added

removed removed

Lines of Context:
51
51
        self.addCleanup(a_lock.unlock)
52
52
        txt = a_lock.f.read()
53
53
        self.assertEqual('', txt)
 
54
        a_lock.f.seek(0)
54
55
        a_lock.f.write('foo\n')
55
56
        a_lock.f.seek(0)
56
57
        txt = a_lock.f.read()
67
68
        a_lock = self.read_lock('a-file')
68
69
        a_lock.unlock()
69
70
 
70
 
        # TODO: jam 20070313 This should be a specific subclass
71
71
        self.assertRaises(errors.ReadOnlyLockError, self.write_lock, 'a-file')
72
72
 
73
73
    def test_write_lock(self):