diff options
Diffstat (limited to 'Lib/test/test_asyncio/utils.py')
-rw-r--r-- | Lib/test/test_asyncio/utils.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/Lib/test/test_asyncio/utils.py b/Lib/test/test_asyncio/utils.py index 6c809770b4a..f756ec9016f 100644 --- a/Lib/test/test_asyncio/utils.py +++ b/Lib/test/test_asyncio/utils.py @@ -485,6 +485,14 @@ class MockPattern(str): return bool(re.search(str(self), other, re.S)) +class MockInstanceOf: + def __init__(self, type): + self._type = type + + def __eq__(self, other): + return isinstance(other, self._type) + + def get_function_source(func): source = format_helpers._get_function_source(func) if source is None: |