• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

maximunited / imou_life / 25291566526
90%

Build:
DEFAULT BRANCH: master
Ran 03 May 2026 09:41PM UTC
Jobs 4
Files 22
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

03 May 2026 09:39PM UTC coverage: 89.545%. Remained the same
25291566526

push

github

web-flow
test: fix skipped switch test to achieve 100% test pass rate (#34)

* test: fix skipped switch test to achieve 100% test pass rate

Unskipped and fixed test_switch test in test_switch.py.

Changes:
- Removed @pytest.mark.skip decorator
- Rewrote test to use proper mocking of sensor methods
- Created full mock sensor with AsyncMock for async_turn_on/async_turn_off
- Patched async_write_ha_state to avoid HA internal complexity
- Directly tests entity methods instead of service calls
- Removed unused imports (SERVICE_TURN_OFF, SERVICE_TURN_ON, ATTR_ENTITY_ID)

Result: All 397 unit tests now passing (100% pass rate, no skips)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>

* refactor: address CodeRabbit review feedback in test_switch

- Remove unused patch for custom_components.imou_life.async_setup_entry
- Add explicit assertion before accessing async_add_devices.call_args

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>

* refactor: add type hints and remove hard-coded entity_id in test_switch

- Add type hints to bypass_added_to_hass fixture: Generator[None, None, None]
- Add type hints to test_switch: hass: HomeAssistant -> None
- Import Generator from typing and HomeAssistant from homeassistant.core
- Remove manual entity_id assignment (already set by async_generate_entity_id)
- Use switch_entity.entity_id instead of hard-coded string in hass.states.async_set

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Sonnet 4.5 <noreply@anthropic.com>

1379 of 1540 relevant lines covered (89.55%)

3.58 hits per line

Jobs
ID Job ID Ran Files Coverage
1 run-3.11 - 25291566526.1 03 May 2026 09:41PM UTC 22
89.55
GitHub Action Run
2 run-3.12 - 25291566526.2 03 May 2026 09:41PM UTC 22
89.55
GitHub Action Run
3 run-3.14 - 25291566526.3 03 May 2026 09:42PM UTC 22
89.52
GitHub Action Run
4 run-3.13 - 25291566526.4 03 May 2026 09:42PM UTC 22
89.55
GitHub Action Run
Source Files on build 25291566526
  • Tree
  • List 22
  • Changed 0
  • Source Changed 0
  • Coverage Changed 0
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #25291566526
  • 2d0dad82 on github
  • Prev Build on master (#25290189604)
  • Next Build on master (#25291733566)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc