1
0
Fork 0

Adding upstream version 2.1.0.

Signed-off-by: Daniel Baumann <daniel@debian.org>
This commit is contained in:
Daniel Baumann 2025-02-07 00:47:33 +01:00
parent d1aeef90c9
commit d8a70e48ab
Signed by: daniel
GPG key ID: FBB4F0E80A80222F
56 changed files with 3865 additions and 0 deletions

16
tests/utils.py Normal file
View file

@ -0,0 +1,16 @@
# -*- coding: utf-8 -*-
"""Utility functions for CLI Helpers' tests."""
from __future__ import unicode_literals
from functools import wraps
from .compat import TemporaryDirectory
def with_temp_dir(f):
"""A wrapper that creates and deletes a temporary directory."""
@wraps(f)
def wrapped(*args, **kwargs):
with TemporaryDirectory() as temp_dir:
return f(*args, temp_dir=temp_dir, **kwargs)
return wrapped