Skip to content

cayu.testing.ExecCommand

Part of cayu.testing.base. Read the Python API overview and install the required extra.

from cayu.testing import ExecCommand

Command to execute.

argv is the default safe process form. shell is reserved for explicit shell scripts where parsing, expansion, and quoting are intentional.

Bases: _CommandValidationModel.

Defaults below are source expressions; Field(...) includes schema/validation settings and default_factory creates a fresh value. Inherited declarations are included. Constructor behavior follows the model or dataclass shown in the bases/decorators.

Name Type Default
kind Literal['process', 'shell'] 'process'
argv list[str] | None None
shell str | None None
ExecCommand.model_validate(obj: Any, *, strict: bool | None=None, extra: Any=None, from_attributes: bool | None=None, context: Any | None=None, by_alias: bool | None=None, by_name: bool | None=None) -> Self
ExecCommand.model_validate_json(json_data: str | bytes | bytearray, *, strict: bool | None=None, extra: Any=None, context: Any | None=None, by_alias: bool | None=None, by_name: bool | None=None) -> Self
ExecCommand.model_validate_strings(obj: Any, *, strict: bool | None=None, extra: Any=None, context: Any | None=None, by_alias: bool | None=None, by_name: bool | None=None) -> Self
ExecCommand.__init__(**data: Any) -> None
ExecCommand.copy_argv(value: list[str] | None) -> list[str] | None
ExecCommand.process(*argv: str) -> ExecCommand
ExecCommand.bash(script: str) -> ExecCommand
ExecCommand.validate_shape() -> ExecCommand

Release source · Runtime guarantees · Capability guides