@@ -271,28 +271,19 @@ def test_compute_breakdown_zero_baseline(self, CAPMethodsMock):
271
271
CAPMethodsMock .get .return_value = CAPMock
272
272
273
273
# Run
274
- score_breakdown_with_cap = DisclosureProtection .compute_breakdown (
275
- real_data = real_data ,
276
- synthetic_data = synthetic_data ,
277
- known_column_names = ['col1' ],
278
- sensitive_column_names = ['col2' ],
279
- )
280
-
281
- CAPMock ._compute .return_value = 0
282
- score_breakdown_no_cap = DisclosureProtection .compute_breakdown (
274
+ score_breakdown = DisclosureProtection .compute_breakdown (
283
275
real_data = real_data ,
284
276
synthetic_data = synthetic_data ,
285
277
known_column_names = ['col1' ],
286
278
sensitive_column_names = ['col2' ],
287
279
)
288
280
289
281
# Assert
290
- assert score_breakdown_with_cap == {
291
- 'score' : 1 ,
282
+ assert score_breakdown == {
283
+ 'score' : np . nan ,
292
284
'baseline_protection' : 0 ,
293
285
'cap_protection' : 0.5 ,
294
286
}
295
- assert score_breakdown_no_cap == {'score' : 0 , 'baseline_protection' : 0 , 'cap_protection' : 0 }
296
287
297
288
@patch ('sdmetrics.single_table.privacy.disclosure_protection.CAP_METHODS' )
298
289
@patch (
@@ -323,7 +314,7 @@ def test_compute_breakdown_warns_too_large(
323
314
324
315
# Run
325
316
expected_warning = re .escape (
326
- 'Data exceeds 50000 rows, perfomance may be slow.'
317
+ 'Data exceeds 10000 rows, perfomance may be slow. '
327
318
'Consider using the `DisclosureProtectionEstimate` for faster computation.'
328
319
)
329
320
with pytest .warns (UserWarning , match = expected_warning ):
@@ -486,7 +477,7 @@ def test__compute_estimated_cap_metric_zero_baseline(self, CAPMethodsMock):
486
477
)
487
478
488
479
# Assert
489
- assert avg_score == 1
480
+ assert np . isnan ( avg_score )
490
481
assert avg_computed_score == 0.38
491
482
492
483
@patch (
0 commit comments