basnijholt / adaptive-lighting

Adaptive Lighting custom component for Home Assistant
https://basnijholt.github.io/adaptive-lighting/
Apache License 2.0
1.7k stars 127 forks source link

Fix `test_proactive_adaptation_with_separate_commands` #970

Closed basnijholt closed 2 months ago

basnijholt commented 2 months ago

I used:

git bisect start
git bisect good 25909f2ebd6
git bisect bad dev
git bisect run ./test.sh
❯ cat core/test.sh
#!/bin/bash

python3 -b -X dev -m pytest \
            -qq \
            --timeout=9 \
            --durations=10 \
            -o console_output_style=count \
            -p no:sugar tests/components/adaptive_lighting/test_switch.py::test_proactive_adaptation_with_separate_commands

Which shows:

fb98a6f02661b3397ddbdc18dd3468cc281825a5 is the first bad commit
commit fb98a6f02661b3397ddbdc18dd3468cc281825a5
Author: J. Nick Koston <nick@koston.org>
Date:   Fri Apr 5 16:14:20 2024 -1000

    Make run_immediately the default for core EventBus listeners (#113752)

    * DNM: Make run_immediately the default for listeners

    This is a test to see how much progress we have made twords this goal

    https://github.com/home-assistant/core/pull/113727#issuecomment-2004587947

    * fix shutdown

    * Revert "fix shutdown"

    This reverts commit a8969d7db9fed10040cb8b7b25459dc9d812eb9c.

    * set false since it break utility meter tests

    * one more

    * fix rfxtrx test

    * test needs to be explict now

    * fix matrix

    * fail sooner

 homeassistant/components/matrix/__init__.py | 4 +++-
 homeassistant/components/rfxtrx/__init__.py | 4 +++-
 homeassistant/core.py                       | 4 ++--
 homeassistant/helpers/event.py              | 5 ++++-
 homeassistant/helpers/start.py              | 4 +++-
 tests/common.py                             | 4 +++-
 tests/components/automation/test_init.py    | 4 +++-
 tests/test_core.py                          | 6 ++++--
 8 files changed, 25 insertions(+), 10 deletions(-)

And test_proactive_adaptation_transition_override broke on:

bdede0e0daa9d518e0781081c0409efbf4d86c8f is the first bad commit
commit bdede0e0daa9d518e0781081c0409efbf4d86c8f
Author: J. Nick Koston <nick@koston.org>
Date:   Thu Mar 14 16:53:26 2024 -1000

    Start script runs eagerly (#113190)

 homeassistant/helpers/script.py                               |  3 ++-
 tests/components/fan/common.py                                |  8 ++++++++
 tests/components/homeassistant/triggers/test_numeric_state.py | 10 ++++++++--
 tests/components/homeassistant/triggers/test_state.py         | 10 ++++++++--
 tests/components/template/test_fan.py                         |  1 +
 tests/helpers/test_script.py                                  |  9 ++++++---
 6 files changed, 33 insertions(+), 8 deletions(-)