# 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