|
1 | 1 | from __future__ import annotations |
2 | 2 |
|
3 | | -import inspect |
4 | 3 | import sys |
5 | 4 | from asyncio import iscoroutinefunction |
6 | 5 | from collections.abc import Awaitable, Callable, Coroutine |
7 | | -from types import CoroutineType |
8 | 6 | from typing import Any |
9 | 7 | from typing_extensions import assert_type |
10 | 8 |
|
@@ -40,22 +38,3 @@ def test_iscoroutinefunction_asyncio( |
40 | 38 |
|
41 | 39 | if iscoroutinefunction(xx): |
42 | 40 | assert_type(xx, Callable[..., Coroutine[Any, Any, Any]]) |
43 | | - |
44 | | - |
45 | | -def test_iscoroutinefunction_inspect( |
46 | | - x: Callable[[str, int], Coroutine[str, int, bytes]], |
47 | | - y: Callable[[str, int], Awaitable[bytes]], |
48 | | - z: Callable[[str, int], str | Awaitable[bytes]], |
49 | | - xx: object, |
50 | | -) -> None: |
51 | | - if inspect.iscoroutinefunction(x): |
52 | | - assert_type(x, Callable[[str, int], Coroutine[str, int, bytes]]) |
53 | | - |
54 | | - if inspect.iscoroutinefunction(y): |
55 | | - assert_type(y, Callable[[str, int], CoroutineType[Any, Any, bytes]]) |
56 | | - |
57 | | - if inspect.iscoroutinefunction(z): |
58 | | - assert_type(z, Callable[[str, int], CoroutineType[Any, Any, Any]]) |
59 | | - |
60 | | - if inspect.iscoroutinefunction(xx): |
61 | | - assert_type(xx, Callable[..., CoroutineType[Any, Any, Any]]) |
0 commit comments