Finding
File: tests/test_report_html.py:2579
Severity: Important
Description
All three TestPhaseTimelineDotColoring tests contain vacuous assertions — e.g. assert "phase-status-rework" in content — that always pass because the CSS <style> block in the HTML template already contains .phase-status-rework, .phase-status-completed, and .phase-status-failed class definitions. As a result, even rendering with include_sessions=False (producing no phase dots at all) would pass all three assertions.
Suggested Fix
Make assertions specific to the rendered HTML element rather than the raw content string. For example:
- Assert on the full class attribute string only present in a dot
<span>: assert 'phase-status phase-status-rework' in content
- Count occurrences and assert count ≥ 2 (one from CSS, one+ from rendered HTML)
- Parse with BeautifulSoup/regex to find
<span> elements carrying the expected class
Reference
Found during review of PR #270 (fix: HTML report phase timeline ordering and rework coloring). Did not block the PR.
Finding
File:
tests/test_report_html.py:2579Severity: Important
Description
All three
TestPhaseTimelineDotColoringtests contain vacuous assertions — e.g.assert "phase-status-rework" in content— that always pass because the CSS<style>block in the HTML template already contains.phase-status-rework,.phase-status-completed, and.phase-status-failedclass definitions. As a result, even rendering withinclude_sessions=False(producing no phase dots at all) would pass all three assertions.Suggested Fix
Make assertions specific to the rendered HTML element rather than the raw content string. For example:
<span>:assert 'phase-status phase-status-rework' in content<span>elements carrying the expected classReference
Found during review of PR #270 (fix: HTML report phase timeline ordering and rework coloring). Did not block the PR.