kyu_6.who_likes_it package
Submodules
kyu_6.who_likes_it.likes_function module
Solution for -> Who likes it?.
Created by Egor Kostan. GitHub: https://github.com/ikostan
- kyu_6.who_likes_it.likes_function.likes(names: list) str[source]
Likes.
A function which must take in input array, containing the names of people who like an item. It must return the display text.
For 4 or more names, the number in and 2 others simply increases.
- Parameters:
names – input array, containing the names of people who like an item
- Returns:
the display text
kyu_6.who_likes_it.test_likes_function module
Test for -> likes function.
Created by Egor Kostan. GitHub: https://github.com/ikostan
- class kyu_6.who_likes_it.test_likes_function.LikesTestCase(methodName='runTest')[source]
Bases:
TestCaseTesting likes function.
The function should take in input array, containing the names of people who like an item. It must return the display text. For 4 or more names, the number in and 2 others simply increases.
- _classSetupFailed = False
- _class_cleanups = []
- test_likes_function = None
- test_likes_function_0(**kw)
Testing likes function with various test data [with names=[], expected=’no one likes this’].
- Returns:
- test_likes_function_1(**kw)
Testing likes function with various test data [with names=[‘Peter’], expected=’Peter likes this’].
- Returns:
- test_likes_function_2(**kw)
Testing likes function with various test data [with names=[‘Jacob’, ‘Alex’], expected=’Jacob and Alex like this’].
- Returns:
- test_likes_function_3(**kw)
Testing likes function with various test data [with names=[‘Max’, ‘John’, ‘Mark’], expected=’Max, John and Mark like this’].
- Returns:
- test_likes_function_4(**kw)
Testing likes function with various test data [with names=[‘Alex’, ‘Jacob’, ‘Mark’, ‘Max’], expected=’Alex, Jacob and 2 others like this’].
- Returns:
Module contents
Who likes it.