1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38
|
# SPDX-FileCopyrightText: 2020-2023 Greenbone AG
#
# SPDX-License-Identifier: GPL-3.0-or-later
#
# pylint: disable=no-name-in-module,no-member,unnecessary-dunder-call
import builtins
import sys
from unittest import IsolatedAsyncioTestCase
from unittest.mock import AsyncMock
from pontos.testing import AsyncIteratorMock
if sys.version_info.minor < 10:
# aiter and anext have been added in Python 3.10
def aiter(obj): # pylint: disable=redefined-builtin
return obj.__aiter__()
def anext(obj): # pylint: disable=redefined-builtin
return obj.__anext__()
else:
def aiter(obj): # pylint: disable=redefined-builtin
return builtins.aiter(obj)
def anext(obj): # pylint: disable=redefined-builtin
return builtins.anext(obj)
__all__ = (
"IsolatedAsyncioTestCase",
"AsyncMock",
"AsyncIteratorMock",
"aiter",
"anext",
)
|