예제 #1
0
파일: helpers.py 프로젝트: yask123/merge
 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()
예제 #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()
예제 #3
0
파일: helpers.py 프로젝트: yask123/merge
 def test(self):
     file = tempfile.NamedTemporaryFile()
     lock = UpgradableLock(file.name)
     lock.upgrade()
     lock.upgrade()
     lock.release()
예제 #4
0
 def test(self):
     file = tempfile.NamedTemporaryFile()
     lock = UpgradableLock(file.name)
     lock.upgrade()
     lock.upgrade()
     lock.release()