Skip to content

Test the pragma-excluded websocket/auto-shutdown paths #45

Description

@tschm

Subcategory: Test coverage & depth
Score: 7 → 9 (target)

The suite reports 100% line coverage, but 9 # pragma: no cover markers in src/ exclude the hardest runtime paths — chiefly the websocket/auto-shutdown machinery and the blocking loop:

  • src/pycharting/core/lifecycle.py:77websocket_heartbeat
  • src/pycharting/core/lifecycle.py:104 / :113_monitor_connection branches
  • src/pycharting/core/lifecycle.py:135 — background _run_server exception path
  • src/pycharting/api/interface.py:234plot blocking loop

Line coverage therefore overstates test depth: the concurrency-critical behavior is untested.

Done when: the heartbeat / connection-monitor / auto-shutdown logic is exercised by tests and those # pragma: no cover markers are removed (coverage still ≥ 90%).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions