sift_client.util.test_results.pytest_util
¶
| FUNCTION | DESCRIPTION |
|---|---|
client_has_connection |
Check if the SiftClient has a connection to the Sift server. |
module_substep |
Create a step per module. |
module_substep_check_connection |
Create a step per module. Doesn't run if the client has no connection to the Sift server. |
pytest_runtest_makereport |
You should import this hook to capture any AssertionErrors that occur during the test. If not included, any assert failures in a test will not automatically fail the step. |
report_context |
Create a report context for the session. |
report_context_check_connection |
Create a report context for the session. Doesn't run if the client has no connection to the Sift server. |
step |
Create an outer step for the function. |
step_check_connection |
Create an outer step for the function. Doesn't run if the client has no connection to the Sift server. |
| ATTRIBUTE | DESCRIPTION |
|---|---|
REPORT_CONTEXT |
TYPE:
|
client_has_connection
¶
Check if the SiftClient has a connection to the Sift server.
Can be used to skip tests that require a connection to the Sift server.
module_substep
¶
module_substep(
report_context: ReportContext, request: FixtureRequest
) -> Generator[NewStep | None, None, None]
Create a step per module.
module_substep_check_connection
¶
module_substep_check_connection(
report_context: ReportContext,
client_has_connection: bool,
request: FixtureRequest,
) -> Generator[NewStep | None, None, None]
Create a step per module. Doesn't run if the client has no connection to the Sift server.
pytest_runtest_makereport
¶
You should import this hook to capture any AssertionErrors that occur during the test. If not included, any assert failures in a test will not automatically fail the step.
report_context
¶
report_context(
sift_client: SiftClient, request: FixtureRequest
) -> Generator[ReportContext | None, None, None]
Create a report context for the session.
report_context_check_connection
¶
report_context_check_connection(
sift_client: SiftClient,
client_has_connection: bool,
request: FixtureRequest,
) -> Generator[ReportContext | None, None, None]
Create a report context for the session. Doesn't run if the client has no connection to the Sift server.
step
¶
step(
report_context: ReportContext, request: FixtureRequest
) -> Generator[NewStep | None, None, None]
Create an outer step for the function.
step_check_connection
¶
step_check_connection(
report_context: ReportContext,
client_has_connection: bool,
request: FixtureRequest,
) -> Generator[NewStep | None, None, None]
Create an outer step for the function. Doesn't run if the client has no connection to the Sift server.