uncscode / particula

a simple, fast, and powerful particle simulator
https://uncscode.github.io/particula
MIT License
6 stars 9 forks source link

Expand Test for distribution facotries #488

Open Gorkowski opened 1 month ago

Gorkowski commented 1 month ago

suggestion (testing): Enhance test_mass_based_moving_bin with additional assertions

Consider adding more assertions to verify the properties or behavior of the created MassBasedMovingBin instance. This would make the test more comprehensive and valuable.

Suggested change def test_mass_based_moving_bin(): """Test factory function for mass-based moving bin strategy.""" strategy = DistributionFactory().get_strategy("mass_based_moving_bin") assert isinstance(strategy, MassBasedMovingBin) def test_mass_based_moving_bin(): """Test factory function for mass-based moving bin strategy.""" strategy = DistributionFactory().get_strategy("mass_based_moving_bin") assert isinstance(strategy, MassBasedMovingBin) assert hasattr(strategy, 'bin_size') assert hasattr(strategy, 'num_bins') assert callable(getattr(strategy, 'distribute', None)) assert strategy.bin_size > 0 assert strategy.num_bins > 0