def default_runpath_mock(entity): """To avoid runpath collision in testing""" prefix = "{}_".format(path.slugify(entity.uid())) if os.environ.get("TEST_ROOT_RUNPATH"): return tempfile.mkdtemp(prefix=prefix, dir=os.environ["TEST_ROOT_RUNPATH"]) else: return tempfile.mkdtemp(prefix=prefix)
def default_runpath_mock(entity): """To avoid runpath collision in testing""" runpath = tempfile.mkdtemp(prefix="{}_".format(slugify(entity.uid()))) return runpath