summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_asyncio/test_pep492.py
diff options
context:
space:
mode:
authorYurii Karabas <1998uriyyo@gmail.com>2020-11-24 18:08:54 (GMT)
committerGitHub <noreply@github.com>2020-11-24 18:08:54 (GMT)
commit0ec34cab9dd4a7bcddafaeeb445fae0f26afcdd1 (patch)
tree89a37fba7519bd02dca2192e788bf8afe50aecdd /Lib/test/test_asyncio/test_pep492.py
parentb0b428510cfd604a8eef1f245f039331e671ea4a (diff)
downloadcpython-0ec34cab9dd4a7bcddafaeeb445fae0f26afcdd1.zip
cpython-0ec34cab9dd4a7bcddafaeeb445fae0f26afcdd1.tar.gz
cpython-0ec34cab9dd4a7bcddafaeeb445fae0f26afcdd1.tar.bz2
bpo-42392: Remove loop parameter form asyncio locks and Queue (#23420)
Co-authored-by: Andrew Svetlov <andrew.svetlov@gmail.com>
Diffstat (limited to 'Lib/test/test_asyncio/test_pep492.py')
-rw-r--r--Lib/test/test_asyncio/test_pep492.py26
1 files changed, 12 insertions, 14 deletions
diff --git a/Lib/test/test_asyncio/test_pep492.py b/Lib/test/test_asyncio/test_pep492.py
index c5e3a5c..4bd50f4 100644
--- a/Lib/test/test_asyncio/test_pep492.py
+++ b/Lib/test/test_asyncio/test_pep492.py
@@ -43,13 +43,12 @@ class BaseTest(test_utils.TestCase):
class LockTests(BaseTest):
def test_context_manager_async_with(self):
- with self.assertWarns(DeprecationWarning):
- primitives = [
- asyncio.Lock(loop=self.loop),
- asyncio.Condition(loop=self.loop),
- asyncio.Semaphore(loop=self.loop),
- asyncio.BoundedSemaphore(loop=self.loop),
- ]
+ primitives = [
+ asyncio.Lock(),
+ asyncio.Condition(),
+ asyncio.Semaphore(),
+ asyncio.BoundedSemaphore(),
+ ]
async def test(lock):
await asyncio.sleep(0.01)
@@ -66,13 +65,12 @@ class LockTests(BaseTest):
self.assertFalse(primitive.locked())
def test_context_manager_with_await(self):
- with self.assertWarns(DeprecationWarning):
- primitives = [
- asyncio.Lock(loop=self.loop),
- asyncio.Condition(loop=self.loop),
- asyncio.Semaphore(loop=self.loop),
- asyncio.BoundedSemaphore(loop=self.loop),
- ]
+ primitives = [
+ asyncio.Lock(),
+ asyncio.Condition(),
+ asyncio.Semaphore(),
+ asyncio.BoundedSemaphore(),
+ ]
async def test(lock):
await asyncio.sleep(0.01)