Useful Types¶
API¶
CustomTestFn ¶
Bases: Protocol
The function type to be called for custom tests.
Source code in src/gapper/core/types.py
__call__ ¶
Implement.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
data | CustomTestData[T] | The CustomTestData instance. | required |
Raises:
Type | Description |
---|---|
AssertionError | It should raise assertion error if test fails. |
CustomTestData dataclass
¶
CustomEqualityCheckFn ¶
Bases: Protocol
The function type to be called for custom equality checks.
Source code in src/gapper/core/types.py
__call__ ¶
Implement.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
data | CustomEqualityTestData[T] | The CustomEqualityTestData instance. | required |
Raises:
Type | Description |
---|---|
AssertionError | It should raise assertion error if the equality check tails |
CustomEqualityTestData dataclass
¶
PreHookFn ¶
Bases: Protocol
The function type to be called for post checks all the equality check of a test case.
Source code in src/gapper/core/types.py
__call__ ¶
Implement.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
data | PreHookData[T] | The PreTestHookData instance. | required |
Raises:
Type | Description |
---|---|
AssertionError | It should raise assertion error if the pre hook fails. |
PreHookData dataclass
¶
PostHookFn ¶
Bases: Protocol
The function type to be called for post checks all the equality check of a test case.
Source code in src/gapper/core/types.py
__call__ ¶
Implement.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
data | PostHookData[T] | The PostTestHookData instance. | required |
Raises:
Type | Description |
---|---|
AssertionError | It should raise assertion error if the post hook fails. |
PostHookData dataclass
¶
Bases: HookDataBase
, _TCMixin
, _SolSubMixin[T]
, _SolSubResultMixin[T]
Source code in src/gapper/core/types.py
PreTestsFn ¶
Bases: Protocol
Source code in src/gapper/core/types.py
__call__ ¶
Implement.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
data | PreTestsData | The PreTestsData instance. | required |
Raises:
Type | Description |
---|---|
AssertionError | It should raise assertion error if the pre tests hook fail. |
PreTestsData dataclass
¶
PostTestsFn ¶
Bases: Protocol
The function type to be called after all tests are run.
Source code in src/gapper/core/types.py
__call__ ¶
Implement.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
data | PostTestsData | The PostTestsData instance. | required |
Raises:
Type | Description |
---|---|
AssertionError | It should raise assertion error if the post tests hook fail. |