예제 #1
0
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)
예제 #2
0
파일: base.py 프로젝트: dcm/testplan
def default_runpath_mock(entity):
    """To avoid runpath collision in testing"""
    runpath = tempfile.mkdtemp(prefix="{}_".format(slugify(entity.uid())))
    return runpath