summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_asyncio
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2016-02-11 11:11:44 (GMT)
committerSerhiy Storchaka <storchaka@gmail.com>2016-02-11 11:11:44 (GMT)
commit94a619d48b90aba5b5b42004e84b290bb68f0664 (patch)
treefc77c9566191d8597af0be96f17a0b6d5bf82f45 /Lib/test/test_asyncio
parente93b06a0a3255026802be19de249b3fdfe955b96 (diff)
downloadcpython-94a619d48b90aba5b5b42004e84b290bb68f0664.zip
cpython-94a619d48b90aba5b5b42004e84b290bb68f0664.tar.gz
cpython-94a619d48b90aba5b5b42004e84b290bb68f0664.tar.bz2
Issue #26325: Added test.support.check_no_resource_warning() to check that
no ResourceWarning is emitted.
Diffstat (limited to 'Lib/test/test_asyncio')
-rw-r--r--Lib/test/test_asyncio/test_subprocess.py3
1 files changed, 1 insertions, 2 deletions
diff --git a/Lib/test/test_asyncio/test_subprocess.py b/Lib/test/test_asyncio/test_subprocess.py
index e90f17d..c111e2f 100644
--- a/Lib/test/test_asyncio/test_subprocess.py
+++ b/Lib/test/test_asyncio/test_subprocess.py
@@ -427,10 +427,9 @@ class SubprocessMixin:
create = asyncio.create_subprocess_exec(sys.executable, '-c',
'pass', loop=self.loop)
- with warnings.catch_warnings(record=True) as warns:
+ with support.check_no_resource_warning(self):
with self.assertRaises(exc):
self.loop.run_until_complete(create)
- self.assertEqual(warns, [])
if sys.platform != 'win32':