~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_lockable_files.py

  • Committer: Andrew Bennetts
  • Date: 2007-04-12 08:03:10 UTC
  • mto: (2018.5.146 hpss)
  • mto: This revision was merged to the branch mainline in revision 2414.
  • Revision ID: andrew.bennetts@canonical.com-20070412080310-syj0orzfluo3ywb6
Remove some XXXs.

Show diffs side-by-side

added added

removed removed

Lines of Context:
250
250
        new_lockable.lock_write()
251
251
        new_lockable.unlock()
252
252
 
 
253
    def test_second_lock_write_returns_same_token(self):
 
254
        first_token = self.lockable.lock_write()
 
255
        try:
 
256
            if first_token is None:
 
257
                # This test does not apply, because this lockable refuses
 
258
                # tokens.
 
259
                return
 
260
            # Relock the already locked lockable.  It should return the same
 
261
            # token.
 
262
            second_token = self.lockable.lock_write()
 
263
            try:
 
264
                self.assertEqual(first_token, second_token)
 
265
            finally:
 
266
                self.lockable.unlock()
 
267
        finally:
 
268
            self.lockable.unlock()
 
269
 
253
270
    def test_leave_in_place(self):
254
271
        token = self.lockable.lock_write()
255
272
        try: