PipelineDP is a Python framework for applying differentially private aggregations to large datasets using batch processing systems such as Apache Spark, Apache Beam, and more.
This is done mainly to simplify mocking, while there is no particular reason, namely mocking of properties are complicated, it requires mocking of classes, like
But such mocking is bad, because it changes value of max_value in other tests :(. For example the test_count in parameter_tuning.py was incorrect because of incorrect max_value.
The simplest solution is to make max_value to be method, which seems to be not worse than property.
This is done mainly to simplify mocking, while there is no particular reason, namely mocking of properties are complicated, it requires mocking of classes, like
setattr(mock_l0_histogram.__class__, 'max_value', 6)
But such mocking is bad, because it changes value of
max_value
in other tests :(. For example thetest_count
in parameter_tuning.py was incorrect because of incorrectmax_value
.The simplest solution is to make
max_value
to be method, which seems to be not worse than property.