Example #1
0
 def test_read_only_lock_file(self):
     file = tempfile.NamedTemporaryFile()
     os.chmod(file.name, 0o444)
     lock = UpgradableLock(file.name)
     self.assert_raises(UpgradableLock.WriteLockFailed, lock.upgrade)
     lock.release()
Example #2
0
 def test_read_only_lock_file(self):
     file = tempfile.NamedTemporaryFile()
     os.chmod(file.name, 0o444)
     lock = UpgradableLock(file.name)
     self.assert_raises(UpgradableLock.WriteLockFailed, lock.upgrade)
     lock.release()
Example #3
0
 def test(self):
     file = tempfile.NamedTemporaryFile()
     lock = UpgradableLock(file.name)
     lock.upgrade()
     lock.upgrade()
     lock.release()
Example #4
0
 def test(self):
     file = tempfile.NamedTemporaryFile()
     lock = UpgradableLock(file.name)
     lock.upgrade()
     lock.upgrade()
     lock.release()