diff options
Diffstat (limited to 'Lib/test/test_asyncio/utils.py')
-rw-r--r-- | Lib/test/test_asyncio/utils.py | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/Lib/test/test_asyncio/utils.py b/Lib/test/test_asyncio/utils.py index 44943e1fa7b..3fe2ecd2be6 100644 --- a/Lib/test/test_asyncio/utils.py +++ b/Lib/test/test_asyncio/utils.py @@ -550,10 +550,8 @@ class TestCase(unittest.TestCase): policy = support.maybe_get_event_loop_policy() if policy is not None: try: - with warnings.catch_warnings(): - warnings.simplefilter('ignore', DeprecationWarning) - watcher = policy.get_child_watcher() - except NotImplementedError: + watcher = policy._watcher + except AttributeError: # watcher is not implemented by EventLoopPolicy, e.g. Windows pass else: |