22
33from unittest .mock import patch
44
5+ import pytest
6+
57
68class TestExtractMentionsFromYaml :
7- """测试从 YAML 提取 mentions"""
9+ """测试 YAML mentions 兼容层(已废弃) """
810
911 def test_extract_mentions_list (self ):
1012 from issuelab .response_processor import extract_mentions_from_yaml
@@ -20,7 +22,8 @@ def test_extract_mentions_list(self):
2022 - bob
2123confidence: "high"
2224```"""
23- assert extract_mentions_from_yaml (text ) == ["alice" , "bob" ]
25+ with pytest .warns (DeprecationWarning ):
26+ assert extract_mentions_from_yaml (text ) == ["alice" , "bob" ]
2427
2528 def test_extract_mentions_with_at_prefix (self ):
2629 from issuelab .response_processor import extract_mentions_from_yaml
@@ -34,7 +37,8 @@ def test_extract_mentions_with_at_prefix(self):
3437 - "@delta"
3538confidence: "medium"
3639```"""
37- assert extract_mentions_from_yaml (text ) == ["charlie" , "delta" ]
40+ with pytest .warns (DeprecationWarning ):
41+ assert extract_mentions_from_yaml (text ) == ["charlie" , "delta" ]
3842
3943 def test_extract_mentions_invalid_items_filtered (self ):
4044 from issuelab .response_processor import extract_mentions_from_yaml
@@ -49,12 +53,14 @@ def test_extract_mentions_invalid_items_filtered(self):
4953 - "ok_user"
5054confidence: "low"
5155```"""
52- assert extract_mentions_from_yaml (text ) == ["ok_user" ]
56+ with pytest .warns (DeprecationWarning ):
57+ assert extract_mentions_from_yaml (text ) == ["ok_user" ]
5358
5459 def test_no_yaml_mentions (self ):
5560 from issuelab .response_processor import extract_mentions_from_yaml
5661
57- assert extract_mentions_from_yaml ("No mentions here" ) == []
62+ with pytest .warns (DeprecationWarning ):
63+ assert extract_mentions_from_yaml ("No mentions here" ) == []
5864
5965
6066class TestResponseFormatConfig :
0 commit comments