示例#1
0
    def testUnlock(self):
        fileLock = FileLock(self.fileName)
        fileLock.lock()

        self.assertTrue(fileLock.isLocked())
        fileLock.unlock()
        self.assertTrue(not fileLock.isLocked())
示例#2
0
 def testLock(self):
     fileLock = FileLock(self.fileName)
     fileLock.lock()
示例#3
0
 def testInit(self):
     fileLock = FileLock(self.fileName)