summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_asyncio/test_subprocess.py
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2016-02-11 11:12:19 (GMT)
committerSerhiy Storchaka <storchaka@gmail.com>2016-02-11 11:12:19 (GMT)
commit2feb64258558fc280f1d87bec211d83def48a9f0 (patch)
treed370a07dff4adfca5ba740cbdf603d7b6b31c9c1 /Lib/test/test_asyncio/test_subprocess.py
parent885bdc4946890f4bb80557fab80c3874b2cc4d39 (diff)
parent94a619d48b90aba5b5b42004e84b290bb68f0664 (diff)
downloadcpython-2feb64258558fc280f1d87bec211d83def48a9f0.zip
cpython-2feb64258558fc280f1d87bec211d83def48a9f0.tar.gz
cpython-2feb64258558fc280f1d87bec211d83def48a9f0.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/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 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':