summaryrefslogtreecommitdiff
path: root/Lib/test/test_asyncio/test_subprocess.py
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2016-02-11 13:11:44 +0200
committerSerhiy Storchaka <storchaka@gmail.com>2016-02-11 13:11:44 +0200
commit94a619d48b90aba5b5b42004e84b290bb68f0664 (patch)
treefc77c9566191d8597af0be96f17a0b6d5bf82f45 /Lib/test/test_asyncio/test_subprocess.py
parente93b06a0a3255026802be19de249b3fdfe955b96 (diff)
downloadcpython-git-94a619d48b90aba5b5b42004e84b290bb68f0664.tar.gz
Issue #26325: Added test.support.check_no_resource_warning() to check that
no ResourceWarning is emitted.
Diffstat (limited to 'Lib/test/test_asyncio/test_subprocess.py')
-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 e90f17dda6..c111e2fe1e 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':