diff --git a/CHANGES/2497.bugfix b/CHANGES/2497.bugfix new file mode 100644 index 00000000000..0c640a4a1f9 --- /dev/null +++ b/CHANGES/2497.bugfix @@ -0,0 +1 @@ +Ignore `NotImplementedError` raised by `set_child_watcher` from `uvloop`. diff --git a/aiohttp/test_utils.py b/aiohttp/test_utils.py index 8a2caad4cc9..cd8cf7aa0f1 100644 --- a/aiohttp/test_utils.py +++ b/aiohttp/test_utils.py @@ -430,7 +430,8 @@ def setup_test_loop(loop_factory=asyncio.new_event_loop): policy = asyncio.get_event_loop_policy() watcher = asyncio.SafeChildWatcher() watcher.attach_loop(loop) - policy.set_child_watcher(watcher) + with contextlib.suppress(NotImplementedError): + policy.set_child_watcher(watcher) return loop