This commit is contained in:
Your Name
2026-09-07 10:07:47 +08:00
parent cf3fbdc5ef
commit d5164b7369
388 changed files with 19863 additions and 18720 deletions
+10 -5
View File
@@ -1634,7 +1634,11 @@ def test_report_bubbles_report_the_height_they_actually_paint(
host, bubble = _fitted_bubble(reply)
assert bubble.height() > 0
assert abs(bubble.sizeHint().height() - bubble.height()) <= 2
# Wrapping labels can legitimately have a different preferred height at
# their preferred width. Compare against the actual reading-column width.
fitted_height = bubble.heightForWidth(bubble.width())
expected_height = fitted_height if fitted_height >= 0 else bubble.sizeHint().height()
assert abs(expected_height - bubble.height()) <= 2
host.close()
host.deleteLater()
@@ -1646,14 +1650,15 @@ def test_risk_block_uses_the_red_alert_palette() -> None:
assert "#FEF3F2" in risk_card
assert "#F1B35C" not in risk_card # 旧的橙色描边
marker = qss.split("QLabel#AiConsultRiskMarker {", 1)[1].split("}", 1)[0]
assert "#C0392B" in marker
assert "#BE4B58" in marker
def test_clinical_bodies_are_no_longer_rendered_at_eleven_pixels() -> None:
qss = ai_consult_module.AI_CONSULT_QSS
body = qss.split("QLabel#AiConsultRiskBody {\n color: #46557A;", 1)
assert len(body) == 2 or "font-size: 13px" in qss
body = qss.rsplit("QLabel#AiConsultRiskBody {", 1)[1].split("}", 1)[0]
assert "color: #1a1c1f" in body.lower()
assert "font-size: 14px" in body
block = qss.split("QLabel#AiConsultClinicalBody,", 1)[1].split("}", 1)[0]
assert "font-size: 13px" in block
assert "font-size: 14px" in block
assert "font-size: 11px" not in block