-
-
Notifications
You must be signed in to change notification settings - Fork 32.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Ensure config entries are unloaded in tests #90850
Conversation
tests/conftest.py
Outdated
for config_entry in hass.config_entries.async_entries(): | ||
loop.run_until_complete(config_entry.async_unload(hass)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we unload them in a gather?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I had to revert it:
RuntimeError: Task got bad yield: <coroutine object ConfigEntry.async_unload at 0x7f2f09aa0ba0>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think if we want to use gather
we need to make the whole hass
fixture async.
I am not sure why it is not marked as async currently, but I figure there might be a reason for that.
I think we can always migrate to async in a follow-up PR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've opened #91264 to migrate the hass
fixture.
I will adjust this PR accordingly if it is merged first.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
#91264 has been merged.
I have adjusted this PR accordingly, and used gather again.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Aargh - going async has uncovered extra issues
This reverts commit 6077902.
8186a02
to
19bbbe0
Compare
19bbbe0
to
17bd3e5
Compare
5c4a9f8
to
3953351
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, @epenet 👍
../Frenck
Proposed change
Linked to #89976
Needs:
Disconnect race condition AustinBrunkhorst/pysnooz#6workaround implementedType of change
Additional information
Checklist
black --fast homeassistant tests
)If user exposed functionality or configuration variables are added/changed:
If the code communicates with devices, web services, or third-party tools:
Updated and included derived files by running:
python3 -m script.hassfest
.requirements_all.txt
.Updated by running
python3 -m script.gen_requirements_all
..coveragerc
.To help with the load of incoming pull requests: