testflows.machine 0.1.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of testflows.machine might be problematic. Click here for more details.

@@ -0,0 +1,278 @@
1
+ # Copyright 2026 Katteli Inc.
2
+ #
3
+ # Licensed under the Apache License, Version 2.0 (the "License");
4
+ # you may not use this file except in compliance with the License.
5
+ # You may obtain a copy of the License at
6
+ #
7
+ # http://www.apache.org/licenses/LICENSE-2.0
8
+ #
9
+ # Unless required by applicable law or agreed to in writing, software
10
+ # distributed under the License is distributed on an "AS IS" BASIS,
11
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ # See the License for the specific language governing permissions and
13
+ # limitations under the License.
14
+ """TestFlows Machine SDK, version 1.
15
+
16
+ A program starts from one client::
17
+
18
+ import testflows.machine.v1 as machine
19
+
20
+ client = machine.Client()
21
+ with client.sessions.create("ci-1", cpus=4) as session:
22
+ client.sessions.use(session)
23
+ run = client.create("app", disk="app")
24
+ run.run(until="tasks")
25
+ run.checkpoint("boot")
26
+ branch = run.fork(at="^boot")
27
+
28
+ The SDK mirrors the `machine` command. A top-level command is a method of
29
+ `Client`, a command group is an attribute, and a command that takes a run is
30
+ a method of `Run`, with the run dropped: `machine fork app --at ^boot` is
31
+ `run.fork(at="^boot")`. Positional operands stay positional and flags are
32
+ keyword arguments.
33
+
34
+ Everything public is importable from this module. Names that start with an
35
+ underscore, and every module outside `testflows.machine.v1`, are not part of
36
+ the API and change without notice.
37
+ """
38
+
39
+ from . import _requires # noqa: F401 first: refuses to import without the core
40
+ from . import login
41
+ from .client import Client, Delete, Marks, Offload, Preload, Runs, Storage
42
+ from .errors import (
43
+ AlreadyExists,
44
+ ApiError,
45
+ ClassUnavailable,
46
+ Conflict,
47
+ Diverged,
48
+ Error,
49
+ Forbidden,
50
+ InvalidArgument,
51
+ NoCapacity,
52
+ NotFound,
53
+ NotRunning,
54
+ NotSignedIn,
55
+ ServiceUnavailable,
56
+ Timeout,
57
+ Unauthorized,
58
+ )
59
+ from .disks import Disk, Disks
60
+ from .ping import Ping
61
+ from .results import (
62
+ AxisDefault,
63
+ ClockContainer,
64
+ ClockInfo,
65
+ ClockRefused,
66
+ Link,
67
+ LinkChange,
68
+ Neighbor,
69
+ ClockJitter,
70
+ Breakpoint,
71
+ Cgroup,
72
+ Checkpoint,
73
+ Clause,
74
+ Cleanup,
75
+ Command,
76
+ Copies,
77
+ Copy,
78
+ Count,
79
+ Counts,
80
+ Diff,
81
+ Entry,
82
+ Exit,
83
+ Fault,
84
+ File,
85
+ FocusInfo,
86
+ Hashes,
87
+ VcpuHashes,
88
+ Frame,
89
+ Value,
90
+ Variable,
91
+ Injected,
92
+ Listing,
93
+ Library,
94
+ LogEntry,
95
+ Mark,
96
+ Miss,
97
+ Op,
98
+ OutputLine,
99
+ OutputMatch,
100
+ OutputSource,
101
+ OutputWrite,
102
+ PendingInterrupt,
103
+ PendingInterrupts,
104
+ Place,
105
+ Point,
106
+ Process,
107
+ ProcessEvent,
108
+ Prune,
109
+ Recovery,
110
+ Registers,
111
+ ReplayResult,
112
+ Rewound,
113
+ RngInfo,
114
+ RunInfo,
115
+ RunResult,
116
+ Sent,
117
+ Stepped,
118
+ Called,
119
+ Got,
120
+ Hit,
121
+ Container,
122
+ Profile,
123
+ ProfileFunction,
124
+ ProfileStack,
125
+ State,
126
+ StorageInfo,
127
+ StorageOp,
128
+ Symbol,
129
+ Syscall,
130
+ TaskInfo,
131
+ Transfer,
132
+ Vcpu,
133
+ Vector,
134
+ VtimeInfo,
135
+ )
136
+ from .runs import (
137
+ Axis,
138
+ Clock,
139
+ Breakpoints,
140
+ Control,
141
+ Debug,
142
+ Faults,
143
+ Focus,
144
+ Fs,
145
+ Ints,
146
+ Irq,
147
+ Output,
148
+ Rng,
149
+ Run,
150
+ RunMarks,
151
+ Syscalls,
152
+ Tasks,
153
+ Task,
154
+ Vtime,
155
+ )
156
+ from .sessions import Session, Sessions
157
+
158
+ __all__ = [
159
+ "AlreadyExists",
160
+ "ApiError",
161
+ "Axis",
162
+ "AxisDefault",
163
+ "Breakpoint",
164
+ "Breakpoints",
165
+ "Cgroup",
166
+ "Checkpoint",
167
+ "ClassUnavailable",
168
+ "Clause",
169
+ "Cleanup",
170
+ "Client",
171
+ "Clock",
172
+ "ClockContainer",
173
+ "ClockInfo",
174
+ "ClockRefused",
175
+ "Link",
176
+ "LinkChange",
177
+ "Neighbor",
178
+ "ClockJitter",
179
+ "Command",
180
+ "Conflict",
181
+ "Control",
182
+ "Copies",
183
+ "Copy",
184
+ "Count",
185
+ "Counts",
186
+ "Debug",
187
+ "Delete",
188
+ "Diff",
189
+ "Disk",
190
+ "Disks",
191
+ "Diverged",
192
+ "Entry",
193
+ "Error",
194
+ "Exit",
195
+ "Fault",
196
+ "Faults",
197
+ "File",
198
+ "Focus",
199
+ "FocusInfo",
200
+ "Forbidden",
201
+ "Frame",
202
+ "Value",
203
+ "Variable",
204
+ "Fs",
205
+ "Hashes",
206
+ "Injected",
207
+ "Ints",
208
+ "InvalidArgument",
209
+ "Irq",
210
+ "Listing",
211
+ "Library",
212
+ "LogEntry",
213
+ "Mark",
214
+ "Miss",
215
+ "Marks",
216
+ "NoCapacity",
217
+ "NotFound",
218
+ "NotRunning",
219
+ "NotSignedIn",
220
+ "Offload",
221
+ "Op",
222
+ "Output",
223
+ "OutputLine",
224
+ "OutputMatch",
225
+ "OutputSource",
226
+ "OutputWrite",
227
+ "PendingInterrupt",
228
+ "PendingInterrupts",
229
+ "Ping",
230
+ "Place",
231
+ "Point",
232
+ "Preload",
233
+ "Process",
234
+ "ProcessEvent",
235
+ "Prune",
236
+ "Recovery",
237
+ "Registers",
238
+ "ReplayResult",
239
+ "Rewound",
240
+ "Rng",
241
+ "RngInfo",
242
+ "Run",
243
+ "RunInfo",
244
+ "RunMarks",
245
+ "RunResult",
246
+ "Sent",
247
+ "Stepped",
248
+ "Called",
249
+ "Got",
250
+ "Hit",
251
+ "Container",
252
+ "Profile",
253
+ "ProfileFunction",
254
+ "ProfileStack",
255
+ "Runs",
256
+ "ServiceUnavailable",
257
+ "Session",
258
+ "Sessions",
259
+ "State",
260
+ "Storage",
261
+ "StorageInfo",
262
+ "StorageOp",
263
+ "Symbol",
264
+ "Syscall",
265
+ "Syscalls",
266
+ "TaskInfo",
267
+ "Tasks",
268
+ "Task",
269
+ "Timeout",
270
+ "Transfer",
271
+ "Unauthorized",
272
+ "Vcpu",
273
+ "VcpuHashes",
274
+ "Vector",
275
+ "Vtime",
276
+ "VtimeInfo",
277
+ "login",
278
+ ]