test(thinking_trace): add test for <think> half-width marker (doeh cleanup Phase 4.2)
This commit is contained in:
@@ -57,6 +57,15 @@ def test_parse_thinking_with_empty_response():
|
||||
assert response == ""
|
||||
|
||||
|
||||
def test_parse_half_width_think_tag():
|
||||
raw = "<think>This is DWARF debug info, not the actual disassembly.</think>\n\nHere is the disassembly."
|
||||
segments, response = parse_thinking_trace(raw)
|
||||
assert len(segments) == 1
|
||||
assert segments[0].content == "This is DWARF debug info, not the actual disassembly."
|
||||
assert segments[0].marker == "think"
|
||||
assert response == "Here is the disassembly."
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
test_parse_xml_thinking_tag()
|
||||
test_parse_xml_thought_tag()
|
||||
@@ -65,4 +74,5 @@ if __name__ == "__main__":
|
||||
test_parse_empty_response()
|
||||
test_parse_multiple_markers()
|
||||
test_parse_thinking_with_empty_response()
|
||||
test_parse_half_width_think_tag()
|
||||
print("All thinking trace tests passed!")
|
||||
|
||||
Reference in New Issue
Block a user