Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Expand Test for distribution facotries #488

Open
Gorkowski opened this issue Oct 4, 2024 · 0 comments
Open

Expand Test for distribution facotries #488

Gorkowski opened this issue Oct 4, 2024 · 0 comments
Labels
sourcery-ai sourcery-ai

Comments

@Gorkowski
Copy link
Collaborator

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

@mahf708 mahf708 added the sourcery-ai sourcery-ai label Oct 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
sourcery-ai sourcery-ai
Projects
None yet
Development

No branches or pull requests

2 participants