def test_lock(self):
        with FileLock(self.tmpfile, "r+w"):
            try:
                fcntl.flock(self.tmpfd, fcntl.LOCK_EX | fcntl.LOCK_NB) 
                assert False, "Flock should have failed"
            except __HOLE__:
                pass
dataset/ETHPy150Open khamidou/kite/src/back/tests/test_lockfile.py/TestLockfile.test_lock