mirror of
https://github.com/python/cpython.git
synced 2025-08-31 05:58:33 +00:00
Issue #26325: Added test.support.check_no_resource_warning() to check that
no ResourceWarning is emitted.
This commit is contained in:
parent
e93b06a0a3
commit
94a619d48b
5 changed files with 32 additions and 20 deletions
|
@ -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':
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue