kyu_6.sums_of_parts package

Submodules

kyu_6.sums_of_parts.solution module

Test for -> Sums of Parts.

Created by Egor Kostan. GitHub: https://github.com/ikostan

kyu_6.sums_of_parts.solution.parts_sums(input_ls: list) list[source]

Sum of Parts.

The function parts_sums will take as parameter a list input_ls and return a list of the sums of its parts. :param input_ls: :return:

kyu_6.sums_of_parts.test_solution module

Test for -> Sums of Parts.

Created by Egor Kostan. GitHub: https://github.com/ikostan

class kyu_6.sums_of_parts.test_solution.PartsSumTestCase(methodName='runTest')[source]

Bases: TestCase

Testing ‘parts_sums’ function.

_classSetupFailed = False
_class_cleanups = []
test_parts_sum = None
test_parts_sum_0(**kw)

Testing ‘parts_sums’ function with various test data [with input_ls=[], expected=[0]].

Returns:

test_parts_sum_1(**kw)

Testing ‘parts_sums’ function with various test data [with input_ls=[1, 2, 3, 4, 5, 6], expected=[21, 20, 18, 15, 11, 6, 0]].

Returns:

test_parts_sum_2(**kw)

Testing ‘parts_sums’ function with various test data [with input_ls=[0, 1, 3, 6, 10], expected=[20, 20, 19, 16, 10, 0]].

Returns:

test_parts_sum_3(**kw)

Testing ‘parts_sums’ function with various test data [with input_ls=[744125, 935, 407, 454, 430, 90,…144, 6710213, 889, 810, 2579358], expected=[10037855, 9293730, 9292795, 929…0, 2581057, 2580168, 2579358, 0]].

Returns:

Module contents

Sums of Parts.