mirror of
https://github.com/python/cpython.git
synced 2025-08-31 14:07:50 +00:00
bpo-32314: Fix asyncio.run() to cancel runinng tasks on shutdown (#5262)
This commit is contained in:
parent
fc2f407829
commit
a4afcdfa55
4 changed files with 122 additions and 15 deletions
|
@ -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:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue