kyu_8.greek_sort package

Submodules

kyu_8.greek_sort.evaluator module

Evaluator function for -> Greek Sort.

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

kyu_8.greek_sort.evaluator.evaluator(result: int, expected: str) bool[source]

Compare two arguments.

Parameters:
  • result – int

  • expected – str

Returns:

bool

kyu_8.greek_sort.greek_comparator module

Solution for -> Greek Sort.

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

kyu_8.greek_sort.greek_comparator.greek_comparator(lhs: str, rhs: str) int[source]

Greek comparator function.

A custom comparison function of two arguments (iterable elements) which should return a negative, zero or positive number depending on whether the first argument is considered smaller than, equal to, or larger than the second argument. :param lhs: str :param rhs: str :return: int

kyu_8.greek_sort.test_greek_comparator module

Test for -> Greek Sort.

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

class kyu_8.greek_sort.test_greek_comparator.GreekComparatorTestCase(methodName='runTest')[source]

Bases: TestCase

Testing greek_comparator function.

_classSetupFailed = False
_class_cleanups = []
test_greek_comparator = None
test_greek_comparator_0_alpha(**kw)

Testing greek_comparator function with various test inputs [with lhs=’alpha’, rhs=’beta’, expected=’< 0’].

Returns:

test_greek_comparator_1_psi(**kw)

Testing greek_comparator function with various test inputs [with lhs=’psi’, rhs=’psi’, expected=’== 0’].

Returns:

test_greek_comparator_2_upsilon(**kw)

Testing greek_comparator function with various test inputs [with lhs=’upsilon’, rhs=’rho’, expected=’> 0’].

Returns:

Module contents

Greek Sort.