Models for all test Tasks.
Classes:
Name | Description |
---|---|
TestParameters |
Model for most basic test case. Single core first-party Task. Uses only communication via pipes. |
TestBinaryParameters |
Parameters for a simple multi- threaded binary executable. |
TestSocketParameters |
Model for first-party test requiring communication via socket. |
TestWriteOutputParameters |
Model for test Task which writes an output file. Location of file is recorded in database. |
TestReadOutputParameters |
Model for test Task which locates an output file based on an entry in the database, if no path is provided. |
TestBinaryErrParameters
Bases: ThirdPartyParameters
Same as TestBinary, but exits with non-zero code.
Source code in lute/io/models/tests.py
class TestBinaryErrParameters(ThirdPartyParameters):
"""Same as TestBinary, but exits with non-zero code."""
executable: str = Field(
"/sdf/home/d/dorlhiac/test_tasks/test_threads_err",
description="Multi-threaded tes tbinary with non-zero exit code.",
)
p_arg1: int = Field(1, description="Number of threads.")
TestParameters
Bases: TaskParameters
Parameters for the test Task Test
.
Source code in lute/io/models/tests.py
class TestParameters(TaskParameters):
"""Parameters for the test Task `Test`."""
float_var: float = Field(0.01, description="A floating point number.")
str_var: str = Field("test", description="A string.")
class CompoundVar(BaseModel):
int_var: int = 1
dict_var: Dict[str, str] = {"a": "b"}
compound_var: CompoundVar = Field(
description=(
"A compound parameter - consists of a `int_var` (int) and `dict_var`"
" (Dict[str, str])."
)
)
throw_error: bool = Field(
False, description="If `True`, raise an exception to test error handling."
)