Files
django-test/apps/base/tests/utils.py
Jens Kleineheismann 42ef136bbe
All checks were successful
buildbot/django-test-test-python3 Build done.
buildbot/django-test-test-python2 Build done.
UPD: excluded unused function apps.base.tests.utils.mkdtemp from pylint.
2019-10-24 16:37:53 +02:00

14 lines
377 B
Python

# -*- coding: utf-8 -*-
# pylint: skip-file
from __future__ import unicode_literals
import os
from tempfile import mkdtemp as _mkdtmp
def mkdtemp(prefix):
dirname = os.path.dirname
pkg_base_dir = dirname(dirname(dirname(__file__)))
tmp_dir = os.path.join(pkg_base_dir, 'tmp')
os.makedirs(tmp_dir, exist_ok=True)
return _mkdtmp(prefix=prefix, dir=tmp_dir)