-
-
Notifications
You must be signed in to change notification settings - Fork 30.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
Use freezegun in DST tests #58939
Use freezegun in DST tests #58939
Conversation
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.
Looks good.
Should fix the failure seen here: https://github.com/home-assistant/core/runs/4082393018?check_suite_focus=true
Can we now start using freezegun for other tests as well? Because last time I tried to introduce freezegun @balloob did not like it. Don't get me wrong, I am all for it. |
Not sure. I wouldn't have approved this one knowing that. These tests have been a constant source of flapping CI failures so we need a solution here even if we decide freezegun isn't the right one. |
For reference here is his comment on that PR of mine. #46392 |
I discussed this PR with @balloob yesterday before merging, and he's OK with it. In general, patching Since we're now using freezegun for these tests, I'd say we should use them also in other places where exact timing is important. |
Proposed change
Use freezegun in some DST related tests
Includes changes from spulec/freezegun#424
Type 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
.The integration reached or maintains the following Integration Quality Scale:
To help with the load of incoming pull requests: