File: utils.py

package info (click to toggle)
python-ooolib 0.0.22-5
  • links: PTS
  • area: main
  • in suites: bullseye
  • size: 220 kB
  • sloc: python: 1,910; makefile: 40
file content (11 lines) | stat: -rw-r--r-- 234 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
from shutil import rmtree
from tempfile import mkdtemp


def prepare_mkdtemp(case):
    """
    Creates temporary directory and returns its name.
    """
    dirname = mkdtemp()
    case.addCleanup(rmtree, dirname)
    return dirname