File tree Expand file tree Collapse file tree 1 file changed +3
-10
lines changed
Expand file tree Collapse file tree 1 file changed +3
-10
lines changed Original file line number Diff line number Diff line change @@ -64,7 +64,6 @@ def test_route_valid_no_threshold():
6464 assert route .name == "Test Route"
6565 assert route .references == ["reference1" , "reference2" ]
6666 assert route .metadata == {"key" : "value" }
67- assert route .distance_threshold is None
6867
6968
7069def test_route_invalid_threshold_zero ():
@@ -108,18 +107,12 @@ def test_distance_aggregation_method():
108107
109108
110109def test_routing_config_valid ():
111- config = RoutingConfig (distance_threshold = 0.6 , max_k = 5 )
112- assert config .distance_threshold == 0.6
110+ config = RoutingConfig (aggregation_method = DistanceAggregationMethod . min , max_k = 5 )
111+ assert config .aggregation_method == DistanceAggregationMethod ( "min" )
113112 assert config .max_k == 5
114113
115114
116115def test_routing_config_invalid_max_k ():
117116 with pytest .raises (ValidationError ) as excinfo :
118- RoutingConfig (distance_threshold = 0.6 , max_k = 0 )
117+ RoutingConfig (max_k = 0 )
119118 assert "max_k must be a positive integer" in str (excinfo .value )
120-
121-
122- def test_routing_config_invalid_distance_threshold ():
123- with pytest .raises (ValidationError ) as excinfo :
124- RoutingConfig (distance_threshold = 1.5 , max_k = 5 )
125- assert "distance_threshold must be between 0 and 1" in str (excinfo .value )
You can’t perform that action at this time.
0 commit comments