idea164-bexproof-verifiable.../tests/test_privacy.py

10 lines
353 B
Python

from bexproof.privacy import privacy_aggregate
def test_privacy_aggregate_basic():
values = [1.0, 2.0, 3.0, 4.0]
result = privacy_aggregate(values, epsilon=1.0)
# result should be within a plausible range around the true sum (10.0)
assert isinstance(result, float)
assert abs(result - 10.0) < 5.0 # allow some noise margin in MVP