human_requests.autotest¶
Attributes¶
Classes¶
Base class for protocol classes. |
Functions¶
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Module Contents¶
- class AutotestSubtests[source]¶
Base class for protocol classes.
Protocol classes are defined as:
class Proto(Protocol): def meth(self) -> int: ...
Such classes are primarily used with static type checkers that recognize structural subtyping (static duck-typing).
For example:
class C: def meth(self) -> int: return 0 def func(x: Proto) -> int: return x.meth() func(C()) # Passes static type check
See PEP 544 for details. Protocol classes decorated with @typing.runtime_checkable act as simple-minded runtime protocols that check only the presence of given attributes, ignoring their type signatures. Protocol classes can be generic, they are defined as:
class GenProto[T](Protocol): def meth(self) -> T: ...
- autotest_depends_on(
- target: Callable[Ellipsis, Any],
- autotest_params(
- *,
- target: Callable[Ellipsis, Any],
- parent: type[object] | None = None,
- depends_on: Sequence[Callable[Ellipsis, Any]] | None = None,
- autotest_policy(
- *,
- target: Callable[Ellipsis, Any],
- parent: type[object] | None = None,
- depends_on: Sequence[Callable[Ellipsis, Any]] | None = None,
- autotest_data(
- *,
- name: SnapshotName,
- find_autotest_policy( ) AutotestCasePolicy[source]¶
- discover_autotest_methods(
- api: object,
- async execute_autotests(
- api: object,
- schemashot: Any,
- *,
- typecheck_mode: AutotestTypecheckMode | str = 'off',
- async execute_autotests_with_subtests(
- api: object,
- schemashot: Any,
- *,
- subtests: AutotestSubtests,
- typecheck_mode: AutotestTypecheckMode | str = 'off',
- async execute_autotest_case(
- *,
- case: AutotestMethodCase,
- api: object,
- schemashot: Any,
- state: dict[str, Any] | None = None,
- typecheck_mode: AutotestTypecheckMode | str = 'off',