|
|
4a74ca6 |
From 4cb5d333eabcb05153a586dc1a7db0df555f0453 Mon Sep 17 00:00:00 2001
|
|
|
4a74ca6 |
From: "Benjamin A. Beasley" <code@musicinmybrain.net>
|
|
|
4a74ca6 |
Date: Sat, 11 Jun 2022 08:35:03 -0400
|
|
|
4a74ca6 |
Subject: [PATCH] =?UTF-8?q?Replace=20@asyncio.coroutine=20with=20=E2=80=9C?=
|
|
|
4a74ca6 |
=?UTF-8?q?async=20def=E2=80=9D?=
|
|
|
4a74ca6 |
MIME-Version: 1.0
|
|
|
4a74ca6 |
Content-Type: text/plain; charset=UTF-8
|
|
|
4a74ca6 |
Content-Transfer-Encoding: 8bit
|
|
|
4a74ca6 |
|
|
|
4a74ca6 |
---
|
|
|
4a74ca6 |
tests/scope_managers/test_asyncio.py | 3 +--
|
|
|
4a74ca6 |
tests/scope_managers/test_contextvars.py | 3 +--
|
|
|
4a74ca6 |
2 files changed, 2 insertions(+), 4 deletions(-)
|
|
|
4a74ca6 |
|
|
|
4a74ca6 |
diff --git a/tests/scope_managers/test_asyncio.py b/tests/scope_managers/test_asyncio.py
|
|
|
4a74ca6 |
index 14079c4..4817f80 100644
|
|
|
4a74ca6 |
--- a/tests/scope_managers/test_asyncio.py
|
|
|
4a74ca6 |
+++ b/tests/scope_managers/test_asyncio.py
|
|
|
4a74ca6 |
@@ -35,8 +35,7 @@ def scope_manager(self):
|
|
|
4a74ca6 |
return AsyncioScopeManager()
|
|
|
4a74ca6 |
|
|
|
4a74ca6 |
def run_test(self, test_fn):
|
|
|
4a74ca6 |
- @asyncio.coroutine
|
|
|
4a74ca6 |
- def async_test_fn():
|
|
|
4a74ca6 |
+ async def async_test_fn():
|
|
|
4a74ca6 |
test_fn()
|
|
|
4a74ca6 |
asyncio.get_event_loop().run_until_complete(async_test_fn())
|
|
|
4a74ca6 |
|
|
|
4a74ca6 |
diff --git a/tests/scope_managers/test_contextvars.py b/tests/scope_managers/test_contextvars.py
|
|
|
4a74ca6 |
index dd1820f..c8c6f61 100644
|
|
|
4a74ca6 |
--- a/tests/scope_managers/test_contextvars.py
|
|
|
4a74ca6 |
+++ b/tests/scope_managers/test_contextvars.py
|
|
|
4a74ca6 |
@@ -36,8 +36,7 @@ def scope_manager(self):
|
|
|
4a74ca6 |
return ContextVarsScopeManager()
|
|
|
4a74ca6 |
|
|
|
4a74ca6 |
def run_test(self, test_fn):
|
|
|
4a74ca6 |
- @asyncio.coroutine
|
|
|
4a74ca6 |
- def async_test_fn():
|
|
|
4a74ca6 |
+ async def async_test_fn():
|
|
|
4a74ca6 |
test_fn()
|
|
|
4a74ca6 |
asyncio.get_event_loop().run_until_complete(async_test_fn())
|
|
|
4a74ca6 |
|