@@ -38,21 +38,21 @@ def test_get_all_matches_empty_graph(self):
38
38
"""Test that an empty graph returns an empty list."""
39
39
empty_graph = algorithm .SemanticMatchGraph ()
40
40
matches = empty_graph .get_all_matches ()
41
- self .assertEqual ([], matches ,"Empty graph should return an empty list." )
41
+ self .assertEqual ([], matches , "Empty graph should return an empty list." )
42
42
43
43
def test_get_all_matches_duplicate_edges (self ):
44
44
"""Test handling of duplicate edges with different scores."""
45
45
self .graph .add_semantic_match ("A" , "B" , 0.9 ) # Overwriting edge
46
46
matches = self .graph .get_all_matches ()
47
47
48
48
expected_matches = [
49
- algorithm .SemanticMatch (base_semantic_id = "A" , match_semantic_id = "B" , score = 0.9 , path = []), # Overwritten edge
49
+ algorithm .SemanticMatch (base_semantic_id = "A" , match_semantic_id = "B" , score = 0.9 , path = []),
50
50
algorithm .SemanticMatch (base_semantic_id = "B" , match_semantic_id = "C" , score = 0.6 , path = []),
51
51
algorithm .SemanticMatch (base_semantic_id = "C" , match_semantic_id = "D" , score = 0.9 , path = []),
52
52
]
53
53
54
54
self .assertEqual (len (matches ), 3 , "Duplicate edge handling failed." )
55
- self .assertCountEqual (expected_matches , matches ,"Matches do not match expected results." )
55
+ self .assertCountEqual (expected_matches , matches , "Matches do not match expected results." )
56
56
57
57
def test_get_all_matches_varying_weights (self ):
58
58
"""Test that matches with different weights are retrieved correctly."""
@@ -352,5 +352,6 @@ def test_complex_graph(self):
352
352
]
353
353
self .assertEqual (expected , matches_str )
354
354
355
+
355
356
if __name__ == "__main__" :
356
357
unittest .main ()
0 commit comments