mirror of
https://github.com/copier-org/copier.git
synced 2025-05-05 23:42:55 +00:00
16 lines
356 B
Python
16 lines
356 B
Python
# coding=utf-8
|
|
from tempfile import mkdtemp
|
|
import shutil
|
|
|
|
import pytest
|
|
|
|
|
|
@pytest.fixture()
|
|
def dst(request):
|
|
"""Return a real temporary folder path which is unique to each test
|
|
function invocation. This folder is deleted after the test has finished.
|
|
"""
|
|
dst = mkdtemp()
|
|
request.addfinalizer(lambda: shutil.rmtree(dst))
|
|
return dst
|