def tmp(request): t = fs.Tmp() yield t # cleanup if os.path.exists(t.dir) and t.cleanup is True: shutil.rmtree(t.dir)
def tmp(request): """ Create a `tmp` object that geneates a unique temporary directory, and file for each test function that requires it. """ t = fs.Tmp() yield t t.remove()