1
0
Fork 0

Adding upstream version 0.10.9.

Signed-off-by: Daniel Baumann <daniel@debian.org>
This commit is contained in:
Daniel Baumann 2025-02-11 18:25:06 +01:00
parent c0f23aff1f
commit a9c588f707
Signed by: daniel
GPG key ID: FBB4F0E80A80222F
27 changed files with 1822 additions and 0 deletions

26
tests/conftest.py Normal file
View file

@ -0,0 +1,26 @@
from pathlib import Path
from unittest.mock import MagicMock
TEST_DIR = Path(__file__).parents[0]
def fullpath(fname: str):
return str(TEST_DIR / fname)
PATH_FNAME = fullpath('mock_path_file')
PATH_FNAME_EMPTY = fullpath('empty_path_file')
PATH_FNAME_CLASH = fullpath('clash_path_file')
GROUP_FNAME = fullpath('mock_group_file')
def async_mock():
"""
Mock an async function. The calling arguments are saved in a MagicMock.
"""
m = MagicMock()
async def coro(*args, **kwargs):
return m(*args, **kwargs)
coro.mock = m
return coro