~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_lockable_files.py

  • Committer: Robert Collins
  • Date: 2006-01-18 03:09:39 UTC
  • mto: (1534.1.15 integration)
  • mto: This revision was merged to the branch mainline in revision 1550.
  • Revision ID: robertc@robertcollins.net-20060118030939-c5c7106140cf444f
Tweak storage towards mergability.

Show diffs side-by-side

added added

removed removed

Lines of Context:
57
57
 
58
58
    def test_locks(self):
59
59
        self.lockable.lock_read()
60
 
        self.lockable.unlock()
61
 
        self.assertRaises(ReadOnlyError, self.lockable.put, 'foo', 
62
 
                          StringIO('bar\u1234'))
 
60
        try:
 
61
            self.assertRaises(ReadOnlyError, self.lockable.put, 'foo', 
 
62
                              StringIO('bar\u1234'))
 
63
        finally:
 
64
            self.lockable.unlock()
63
65
 
64
66
    def test_transactions(self):
65
67
        self.assertIs(self.lockable.get_transaction().__class__,