summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_asyncio
diff options
context:
space:
mode:
authorPablo Galindo <Pablogsal@gmail.com>2018-10-26 11:19:14 (GMT)
committerGitHub <noreply@github.com>2018-10-26 11:19:14 (GMT)
commit7cd25434164882c2093ea41ccfc7b95a05cd5cbd (patch)
tree76c33543b495e78b0e520dd4914da68dcf616dae /Lib/test/test_asyncio
parente483f02423917dc4dfd25f46e5b9e6fce304777d (diff)
downloadcpython-7cd25434164882c2093ea41ccfc7b95a05cd5cbd.zip
cpython-7cd25434164882c2093ea41ccfc7b95a05cd5cbd.tar.gz
cpython-7cd25434164882c2093ea41ccfc7b95a05cd5cbd.tar.bz2
bpo-34890: Make iscoroutinefunction, isgeneratorfunction and isasyncgenfunction work with functools.partial (GH-9903)
inspect.isfunction() processes both inspect.isfunction(func) and inspect.isfunction(partial(func, arg)) correctly but some other functions in the inspect module (iscoroutinefunction, isgeneratorfunction and isasyncgenfunction) lack this functionality. This commits adds a new check in the mentioned functions in the inspect module so they can work correctly with arbitrarily nested partial functions.
Diffstat (limited to 'Lib/test/test_asyncio')
-rw-r--r--Lib/test/test_asyncio/test_tasks.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/test/test_asyncio/test_tasks.py b/Lib/test/test_asyncio/test_tasks.py
index 0fe7676..c65d1f2 100644
--- a/Lib/test/test_asyncio/test_tasks.py
+++ b/Lib/test/test_asyncio/test_tasks.py
@@ -440,8 +440,8 @@ class BaseTaskTests:
coro_repr = repr(task._coro)
expected = (
- r'<CoroWrapper \w+.test_task_repr_partial_corowrapper'
- r'\.<locals>\.func\(1\)\(\) running, '
+ r'<coroutine object \w+\.test_task_repr_partial_corowrapper'
+ r'\.<locals>\.func at'
)
self.assertRegex(coro_repr, expected)