diff options
author | Serhiy Storchaka <storchaka@gmail.com> | 2016-02-11 11:11:44 (GMT) |
---|---|---|
committer | Serhiy Storchaka <storchaka@gmail.com> | 2016-02-11 11:11:44 (GMT) |
commit | 94a619d48b90aba5b5b42004e84b290bb68f0664 (patch) | |
tree | fc77c9566191d8597af0be96f17a0b6d5bf82f45 /Lib/test/test_asyncio | |
parent | e93b06a0a3255026802be19de249b3fdfe955b96 (diff) | |
download | cpython-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.py | 3 |
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': |