def METHOD_NAME(self):
    os.close(os.open(TEST_FILENAME_FULL_PATH, os.O_WRONLY | os.O_CREAT))
    file = os.open(TEST_FILENAME_FULL_PATH, os.O_WRONLY)
    try:
        fcntl.flock(file, fcntl.LOCK_SH)
        p = subprocess.Popen("flock -s %s -c 'exit 42'" % TEST_FILENAME_FULL_PATH, shell=True)
        time.sleep(0.25)
        assert p.poll() == 42
    finally:
        fcntl.flock(file, fcntl.LOCK_UN)
        os.close(file)