{"action":"opened","issue":{"url":"https://api.github.com/repos/Martiusweb/asynctest/issues/85","repository_url":"https://api.github.com/repos/Martiusweb/asynctest","labels_url":"https://api.github.com/repos/Martiusweb/asynctest/issues/85/labels{/name}","comments_url":"https://api.github.com/repos/Martiusweb/asynctest/issues/85/comments","events_url":"https://api.github.com/repos/Martiusweb/asynctest/issues/85/events","html_url":"https://github.com/Martiusweb/asynctest/issues/85","id":305180004,"number":85,"title":"failure with uvloop and @fail_on","user":{"login":"janhn","id":5754086,"avatar_url":"https://avatars0.githubusercontent.com/u/5754086?v=4","gravatar_id":"","url":"https://api.github.com/users/janhn","html_url":"https://github.com/janhn","followers_url":"https://api.github.com/users/janhn/followers","following_url":"https://api.github.com/users/janhn/following{/other_user}","gists_url":"https://api.github.com/users/janhn/gists{/gist_id}","starred_url":"https://api.github.com/users/janhn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/janhn/subscriptions","organizations_url":"https://api.github.com/users/janhn/orgs","repos_url":"https://api.github.com/users/janhn/repos","events_url":"https://api.github.com/users/janhn/events{/privacy}","received_events_url":"https://api.github.com/users/janhn/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-03-14T14:23:52Z","updated_at":"2018-03-14T14:23:52Z","closed_at":null,"author_association":"NONE","body":"While testing with uvloop, the @fail_on decorator seems to rely on the internals of the default asyncio loop:\r\n\r\n```python\r\nimport asyncio\r\nimport asynctest\r\nimport uvloop\r\n\r\n# make calls to asyncio.get_event_loop() return an instance of uvloop\r\nasyncio.set_event_loop_policy(uvloop.EventLoopPolicy())\r\n\r\n\r\n@asynctest.fail_on(active_handles=True)\r\nclass TestFailOn(asynctest.TestCase):\r\n    \"\"\"\r\n    This raises in asynctest with:\r\n        AttributeError: 'Loop' object has no attribute '_scheduled'\r\n    at .../asynctest/_fail_on.py:88\r\n    \"\"\"\r\n\r\n    use_default_loop = True\r\n\r\n    async def test_async_task(self):\r\n        await asyncio.sleep(0)\r\n```"}}
{"actor":{"display_login":"janhn"}}