@@ -60,42 +60,6 @@ def __init__(self):
6060 assert "─┐" in box_str
6161
6262
63- def test_format_box_scores ():
64- """Test score lines formatting with proper prefixes and precision.
65-
66- Expected format:
67- │ ├─ BM25: 0.950 ...
68- │ ├─ Semantic: 0.820 ...
69- │ └─ Activation: 0.650 ...
70-
71- Scores should have 3 decimal places precision.
72- """
73-
74- class MockResult :
75- def __init__ (self ):
76- self .metadata = {"name" : "test_func" , "file_path" : "test.py" , "type" : "function" }
77- self .content = "def test_func(): pass"
78- self .hybrid_score = 0.856
79- self .bm25_score = 0.950
80- self .semantic_score = 0.820
81- self .activation_score = 0.650
82-
83- result = MockResult ()
84-
85- box_text = _format_score_box (result , _rank = 1 )
86- box_str = str (box_text )
87-
88- # Verify score lines
89- assert "├─ BM25:" in box_str
90- assert "├─ Semantic:" in box_str
91- assert "└─ Activation:" in box_str
92-
93- # Verify precision (3 decimal places)
94- assert "0.950" in box_str
95- assert "0.820" in box_str
96- assert "0.650" in box_str
97-
98-
9963def test_format_box_footer ():
10064 """Test box footer formatting.
10165
@@ -131,39 +95,6 @@ def __init__(self):
13195 assert last_line .endswith ("┘" )
13296
13397
134- def test_format_box_git_metadata ():
135- """Test git metadata line formatting.
136-
137- Expected format:
138- │ Git: 23 commits, last modified 2 days ago │
139- """
140-
141- class MockResult :
142- def __init__ (self ):
143- self .metadata = {
144- "name" : "test_func" ,
145- "file_path" : "test.py" ,
146- "type" : "function" ,
147- "commit_count" : 23 ,
148- "last_modified" : "2 days ago" ,
149- }
150- self .content = "def test_func(): pass"
151- self .hybrid_score = 0.5
152- self .bm25_score = 0.5
153- self .semantic_score = 0.5
154- self .activation_score = 0.5
155-
156- result = MockResult ()
157-
158- box_text = _format_score_box (result , _rank = 1 )
159- box_str = str (box_text )
160-
161- # Verify git metadata
162- assert "Git:" in box_str
163- assert "23 commits" in box_str
164- assert "2 days ago" in box_str
165-
166-
16798def test_format_box_width_adjustment ():
16899 """Test that long names truncate to fit width.
169100
0 commit comments