mirror of
https://github.com/HKUDS/DeepTutor.git
synced 2026-12-05 23:39:37 +08:00
The composer-hint sanitizers used lstrip("-•*# ") to drop list markers,
which also ate the sign of "-3 squared...?", the star of "*args" and
the hash of "#include". Strip a marker only when whitespace follows it.
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
11 lines
425 B
Python
11 lines
425 B
Python
"""Focused tests for the mastery study composer's ask-hint sanitizer."""
|
|
|
|
from __future__ import annotations
|
|
|
|
from deeptutor.services import mastery_hints
|
|
|
|
|
|
def test_sanitize_strips_list_markers_but_keeps_leading_text() -> None:
|
|
assert mastery_hints._sanitize("• Why does it converge?", "en") == "Why does it converge?"
|
|
assert mastery_hints._sanitize("-2 times -3 is positive?", "en") == "-2 times -3 is positive?"
|