hup.base.test module

Unittests.

class Case

Bases: tuple

Class for the storage of Case parameters.

args

Alias for field number 0

kwds

Alias for field number 1

value

Alias for field number 2

class GenericTest(methodName='runTest')

Bases: unittest.case.TestCase

Custom testcase.

assertAllEqual(a: object, b: object) → None

Assert that two objects are equal.

assertCaseContain(func: Callable[[...], Any], cases: List[Case]) → None

Assert that all function evaluations comprise the given values.

assertCaseEqual(func: Callable[[...], Any], cases: List[Case]) → None

Assert that all function evaluations equal the given values.

assertCaseFalse(func: Callable[[...], Any], cases: List[Case]) → None

Assert that all function evaluations cast to False.

assertCaseIn(func: Callable[[...], Any], cases: List[Case]) → None

Assert that all function evaluations are in the given values.

assertCaseIsSubclass(func: Callable[[...], Any], supercls: type, cases: List[Case]) → None

Assert outcome type of a class constructor.

assertCaseNotContain(func: Callable[[...], Any], cases: List[Case]) → None

Assert that all function evaluations comprise the given values.

assertCaseNotEqual(func: Callable[[...], Any], cases: List[Case]) → None

Assert that all function evaluations differ from the given values.

assertCaseNotIn(func: Callable[[...], Any], cases: List[Case]) → None

Assert that all function evaluations are in the given values.

assertCaseNotRaises(cls: Type[BaseException], func: Callable[[...], Any], cases: List[Case]) → None

Assert that no function parameter raises an exception.

assertCaseRaises(cls: Type[BaseException], func: Callable[[...], Any], cases: List[Case]) → None

Assert that all function parameters raise an exception.

assertCaseTrue(func: Callable[[...], Any], cases: List[Case]) → None

Assert that all function evaluations cast to True.

assertExactEqual(a: object, b: object) → None

Assert that two objects are equal in type and value.

assertIsSubclass(cls: type, supercls: type) → None

Assert that a class is a subclass of another.

assertNotRaises(cls: Type[BaseException], func: Callable[[...], Any], *args, **kwds) → None

Assert that an exception is not raised.

class ModuleTest(methodName='runTest')

Bases: hup.base.test.GenericTest

Custom testcase.

assertModuleIsComplete() → None

Assert that all members of module are tested.

test_completeness() → None