summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_inspect.py
diff options
context:
space:
mode:
authorYury Selivanov <yselivanov@sprymix.com>2015-06-30 22:19:01 (GMT)
committerYury Selivanov <yselivanov@sprymix.com>2015-06-30 22:19:01 (GMT)
commita74b5e59af6b4271eac7953771e7d3346e76b058 (patch)
treeb677c97fc2bda02f303c62c4c8545948b2fc00e6 /Lib/test/test_inspect.py
parent86cd7d6b756bb0f99b7854c75dfcd24e1ec3bdbc (diff)
downloadcpython-a74b5e59af6b4271eac7953771e7d3346e76b058.zip
cpython-a74b5e59af6b4271eac7953771e7d3346e76b058.tar.gz
cpython-a74b5e59af6b4271eac7953771e7d3346e76b058.tar.bz2
Issue #24400: Remove inspect.isawaitable().
isawaitable() was added before collections.abc.Awaitable; now, with Awaitable, it is no longer needed (we don't have ishashable() or isiterable() methods in the inspect module either).
Diffstat (limited to 'Lib/test/test_inspect.py')
-rw-r--r--Lib/test/test_inspect.py25
1 files changed, 0 insertions, 25 deletions
diff --git a/Lib/test/test_inspect.py b/Lib/test/test_inspect.py
index 39fa484..ebd106c 100644
--- a/Lib/test/test_inspect.py
+++ b/Lib/test/test_inspect.py
@@ -159,31 +159,6 @@ class TestPredicates(IsTestBase):
coro.close(); gen_coro.close() # silence warnings
- def test_isawaitable(self):
- def gen(): yield
- self.assertFalse(inspect.isawaitable(gen()))
-
- coro = coroutine_function_example(1)
- gen_coro = gen_coroutine_function_example(1)
-
- self.assertTrue(
- inspect.isawaitable(coro))
- self.assertTrue(
- inspect.isawaitable(gen_coro))
-
- class Future:
- def __await__():
- pass
- self.assertTrue(inspect.isawaitable(Future()))
- self.assertFalse(inspect.isawaitable(Future))
-
- class NotFuture: pass
- not_fut = NotFuture()
- not_fut.__await__ = lambda: None
- self.assertFalse(inspect.isawaitable(not_fut))
-
- coro.close(); gen_coro.close() # silence warnings
-
def test_isroutine(self):
self.assertTrue(inspect.isroutine(mod.spam))
self.assertTrue(inspect.isroutine([].count))