Skip to content

Commit

Permalink
fix resource warning due to pytest-asyncio
Browse files Browse the repository at this point in the history
  • Loading branch information
graingert committed Dec 15, 2023
1 parent 356ff41 commit 80614db
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions tests/integration/test_aiohttp.py
Original file line number Diff line number Diff line change
Expand Up @@ -259,6 +259,12 @@ def test_aiohttp_test_client_json(aiohttp_client, tmpdir):
assert cassette.play_count == 1


def test_cleanup_from_pytest_asyncio():
# work around https://github.com/pytest-dev/pytest-asyncio/issues/724
asyncio.get_event_loop().close()
asyncio.set_event_loop(None)


@pytest.mark.online
def test_redirect(tmpdir, httpbin):
url = httpbin.url + "/redirect/2"
Expand Down

0 comments on commit 80614db

Please sign in to comment.