blob: ed58af360e3d104c4a187e3f285c5f33b9a5a8eb [file] [log] [blame]
from functools import partial
import os
import pytest
from tests import shell
@pytest.fixture()
def tmpdir(request):
path = os.path.realpath(shell.mkdtemp())
def finalizer():
shell.rm(path, recursive=True)
request.addfinalizer(finalizer)
return path
@pytest.fixture()
def p(tmpdir, *args):
"""
Convenience function to join the temporary directory path
with the provided arguments.
"""
return partial(os.path.join, tmpdir)