Skip to content

context

TestFunctionContext #

Bases: NamedTuple

metadata instance-attribute #

metadata: _TestFunctionMetadata

tw_allure_reports_dir instance-attribute #

tw_allure_reports_dir: Path

tw_artifacts_dir instance-attribute #

tw_artifacts_dir: Path

tw_gen_dir instance-attribute #

tw_gen_dir: Path

tw_logs_dir instance-attribute #

tw_logs_dir: Path

tw_metadata_dir instance-attribute #

tw_metadata_dir: Path

tw_reports_dir instance-attribute #

tw_reports_dir: Path

tw_run_dir instance-attribute #

tw_run_dir: Path

tw_scripts_dir instance-attribute #

tw_scripts_dir: Path

TestItemContext dataclass #

TestItemContext(
    root_dir: Path,
    run_dir: Path,
    artifacts_dir: Path,
    scripts_dir: Path,
    test_function_name: str,
    test_suite_name: str,
    test_item_name: str,
    test_item_normalized_name: str,
    hash_test_item_name: str,
    test_function_context: TestFunctionContext,
    monkey_patch: MonkeyPatch,
    _env: dict | None = None,
)

artifacts_dir instance-attribute #

artifacts_dir: Path

env property writable #

env: dict | None

hash_test_item_name instance-attribute #

hash_test_item_name: str

monkey_patch instance-attribute #

monkey_patch: MonkeyPatch

root_dir instance-attribute #

root_dir: Path

run_dir instance-attribute #

run_dir: Path

scripts_dir instance-attribute #

scripts_dir: Path

test_function_context instance-attribute #

test_function_context: TestFunctionContext

test_function_name instance-attribute #

test_function_name: str

test_item_name instance-attribute #

test_item_name: str

test_item_normalized_name instance-attribute #

test_item_normalized_name: str

test_suite_name instance-attribute #

test_suite_name: str

get_test_item_context #

get_test_item_context(item: Item) -> TestItemContext