cayu.testing.ExecCommand
Part of cayu.testing.base. Read the Python API overview and install the required extra.
from cayu.testing import ExecCommandCommand 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.
Fields and attributes
Section titled “Fields and attributes”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 |
model_validate (method)
Section titled “model_validate (method)”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) -> Selfmodel_validate_json (method)
Section titled “model_validate_json (method)”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) -> Selfmodel_validate_strings (method)
Section titled “model_validate_strings (method)”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) -> Selfinit (method)
Section titled “init (method)”ExecCommand.__init__(**data: Any) -> Nonecopy_argv (method)
Section titled “copy_argv (method)”ExecCommand.copy_argv(value: list[str] | None) -> list[str] | Noneprocess (method)
Section titled “process (method)”ExecCommand.process(*argv: str) -> ExecCommandbash (method)
Section titled “bash (method)”ExecCommand.bash(script: str) -> ExecCommandvalidate_shape (method)
Section titled “validate_shape (method)”ExecCommand.validate_shape() -> ExecCommand