import pytest from solution import Solution @pytest.mark.parametrize( "weights,days,expected", [ ([1, 2, 3, 4, 5, 6, 7, 8, 9, 10], 5, 15), ([3, 2, 2, 4, 1, 4], 3, 6), ([1, 2, 3, 1, 1], 4, 3), ([1], 1, 1), ([5, 5, 5, 5], 4, 5), ([5, 5, 5, 5], 1, 20), ([10, 50, 100, 100, 50, 10], 1, 320), ([10, 50, 100, 100, 50, 10], 6, 100), ], ) def test_ship_within_days(weights, days, expected): assert Solution().shipWithinDays(weights, days) == expected