Skip to content

Conversation

@lrusak
Copy link
Contributor

@lrusak lrusak commented Oct 12, 2024

What was wrong?

Running pytest -rP tests/beacon/test_async_beacon.py makes the following warning:

tests/beacon/test_async_beacon.py::test_async_beacon_user_request_timeout
  /home/lukas/Documents/git/web3.py/venv/lib64/python3.13/site-packages/aiohttp/client.py:417: ResourceWarning: Unclosed client session <aiohttp.client.ClientSession object at 0x7f9562d34a50>

The change to the synchronous beacon class test is just to make it uniform

How was it fixed?

By using the fixture so that the closure runs and cleans up the aiohttp.client.ClientSession after the test

Todo:

  • Clean up commit history
  • Add or update documentation related to these changes
  • Add entry to the release notes

This fixes the following warning:

tests/beacon/test_async_beacon.py::test_async_beacon_user_request_timeout
  /home/lukas/Documents/git/web3.py/venv/lib64/python3.13/site-packages/aiohttp/client.py:417: ResourceWarning: Unclosed client session <aiohttp.client.ClientSession object at 0x7f9562d34a50>

The change to the syncronous beacon class test is just to make it uniform

Signed-off-by: Lukas Rusak <lorusak@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant