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

maximunited / imou_life / 25234182657
90%

Build:
DEFAULT BRANCH: master
Ran 01 May 2026 09:36PM 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

01 May 2026 09:35PM UTC coverage: 81.452% (+10.8%) from 70.669%
25234182657

push

github

web-flow
test: improve test coverage from 71% to 73% (Silver tier WIP) (#25)

* 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)

1133 of 1391 relevant lines covered (81.45%)

2.44 hits per line

Jobs
ID Job ID Ran Files Coverage
1 run-3.13 - 25234182657.1 01 May 2026 09:37PM UTC 21
81.45
GitHub Action Run
2 run-3.12 - 25234182657.2 01 May 2026 09:36PM UTC 21
81.45
GitHub Action Run
3 run-3.11 - 25234182657.3 01 May 2026 09:36PM UTC 21
81.45
GitHub Action Run
Source Files on build 25234182657
  • Tree
  • List 21
  • Changed 6
  • Source Changed 0
  • Coverage Changed 6
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #25234182657
  • 4ae381b6 on github
  • Prev Build on master (#25231261133)
  • Next Build on master (#25256165690)
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