/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_lockdir.py

  • Committer: Martin Pool
  • Date: 2007-06-27 09:17:22 UTC
  • mto: This revision was merged to the branch mainline in revision 2584.
  • Revision ID: mbp@sourcefrog.net-20070627091722-ouf4om2ib0e4s7ft
Return token directly from LockDir.acquire to avoid unnecessary peek()

Show diffs side-by-side

added added

removed removed

Lines of Context:
625
625
        os.mkdir(lock_path)
626
626
        osutils.make_readonly(lock_path)
627
627
        self.assertRaises(errors.PermissionDenied, ld1.attempt_lock)
 
628
 
 
629
    def test_lock_by_token(self):
 
630
        ld1 = self.get_lock()
 
631
        token = ld1.lock_write()
 
632
        self.assertNotEqual(None, token)
 
633
        ld2 = self.get_lock()
 
634
        t2 = ld2.lock_write(token)
 
635
        self.assertEqual(token, t2)