bpo-32314: Fix asyncio.run() to cancel runinng tasks on shutdown (#5262)

This commit is contained in:
Yury Selivanov 2018-01-21 14:56:59 -05:00 committed by GitHub
parent fc2f407829
commit a4afcdfa55
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 122 additions and 15 deletions

View file

@ -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: