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

maximunited / imou_life / 25256165690
90%

Build:
DEFAULT BRANCH: master
Ran 02 May 2026 04:15PM UTC
Jobs 3
Files 21
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

02 May 2026 04:13PM UTC coverage: 94.896% (+13.4%) from 81.452%
25256165690

push

github

web-flow
test: increase test coverage to 95% for Silver tier compliance (#26)

* test: add comprehensive reauth and switch tests (73% coverage)

Add 31 new unit tests to improve coverage from 71% to 73%:

**Reauthentication Flow Tests** (10 tests)
- test_config_flow_reauth.py with comprehensive reauth coverage
  - Form display and user flow
  - Successful credential update and reload
  - Error handling: invalid credentials, rate limit, connection, API errors
  - Device access verification
  - Empty/None device name fallback
  - All authentication pattern matching
- config_flow.py: 18% ? 40% coverage (+22%)

**Switch Entity Tests** (21 tests)
- test_switch_comprehensive.py covering all switch functionality
  - Normal switch operations (turn_on, turn_off, toggle)
  - Push notifications with callback URL validation
  - State persistence (async_write_ha_state calls)
  - Entity registry enabled/disabled defaults
  - Device info and attributes
  - Availability tracking
- switch.py: 29% ? 60% coverage (+31%)

**Test Summary**:
- Total unit tests: 257 ? 278 (+21, skipping 10 reauth tests in count)
- Overall coverage: 71% ? 73%
- All tests passing

**Next Steps**:
- Add camera PTZ service tests (69% coverage)
- Add __init__.py setup/unload tests (69% coverage)
- Target: 95%+ overall coverage

* test: address CodeRabbit review feedback

- Use next(iter()) for more deterministic set iteration in switch tests
- Use repository standard MockConfigEntry fixture in reauth tests
- Fix immutability issue by creating new MockConfigEntry instances
  for empty/None device name test cases

All 31 tests pass. Dismissed CodeRabbit false positive about
async_write_ha_state() - verified calls exist on lines 100, 113, 125
of switch.py.

* test: add comprehensive switch platform setup tests (100% switch coverage)

- Test async_setup_entry with no switches
- Test async_setup_entry with multiple switches
- Test error handling during sensor creation
- Test critical setup failures

Switch.py... (continued)

1320 of 1391 relevant lines covered (94.9%)

2.85 hits per line

Jobs
ID Job ID Ran Files Coverage
1 run-3.13 - 25256165690.1 02 May 2026 04:15PM UTC 21
94.9
GitHub Action Run
2 run-3.11 - 25256165690.2 02 May 2026 04:15PM UTC 21
94.9
GitHub Action Run
3 run-3.12 - 25256165690.3 02 May 2026 04:15PM UTC 21
94.9
GitHub Action Run
Source Files on build 25256165690
  • Tree
  • List 21
  • Changed 7
  • Source Changed 0
  • Coverage Changed 7
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #25256165690
  • b79a1629 on github
  • Prev Build on master (#25234182657)
  • Next Build on master (#25260686694)
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