def lock_and_sleep(timeout): logging.info("In process %s, locking and sleeping...", os.getpid()) singleton.ensure_lock(name) time.sleep(timeout)
def test_single_ensure_lock(self): singleton.ensure_lock(name) singleton.unlock(name)